Npm audit fix and create PR #24
This file contains hidden or 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: Npm audit fix and create PR | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows | |
| # In a public repository, scheduled workflows are automatically disabled when no | |
| # repository activity has occurred in 60 days | |
| - cron: "5 6 * * 1-5" # At 06:05 on every day-of-week from Monday through Friday | |
| jobs: | |
| npm-audit-fix: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Update vulnerable node packages | |
| run: | | |
| npm audit fix | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e #v7 | |
| with: | |
| commit-message: "GHA: Update vulnerable node dependencies" | |
| title: Update vulnerable node dependencies | |
| body: | | |
| - Dependency node updates | |
| Auto-generated by [create-pull-request][1] | |
| [1]: https://github.com/peter-evans/create-pull-request | |
| branch: update-node-dependencies | |
| labels: automated-pr | |
| delete-branch: true |