Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |