Skip to content

Viewtransitionapi

Viewtransitionapi #92

name: Calc disk space usage of node_modules
on:
- pull_request
jobs:
calc-and-comment:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install pnpm and dependencies
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true
- name: Calculate and comment node_modules disk usage to PR
run: |
NODE_MODULES_SIZE=$(du -sh node_modules | cut -f1)
COMMENT="node_modules/ uses $NODE_MODULES_SIZE of disk space."
gh pr comment ${{ github.event.number }} --body "$COMMENT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}