Update Dependencies #22
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: Update Dependencies | |
| on: | |
| schedule: | |
| # Run weekly on Mondays at 9 AM UTC | |
| - cron: '0 9 * * 1' | |
| workflow_dispatch: # Allow manual trigger | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-deps: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Update dependencies | |
| run: | | |
| npm update | |
| npm audit fix --audit-level moderate || true | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| if git diff --quiet package-lock.json; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.changes.outputs.changed == 'true' | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'chore(deps): update dependencies' | |
| title: 'chore(deps): update dependencies' | |
| body: | | |
| ## 🔄 Automated Dependency Update | |
| This PR updates dependencies to their latest versions. | |
| ### Changes | |
| - Updated npm dependencies | |
| - Fixed security vulnerabilities (if any) | |
| ### Testing | |
| - [ ] CI tests pass | |
| - [ ] Manual testing completed | |
| **Auto-generated by GitHub Actions** | |
| branch: chore/update-dependencies | |
| delete-branch: true |