Update Dependencies #35
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
| # Generated by Claude Sonnet 4 AI model | |
| name: Update Dependencies | |
| on: | |
| schedule: | |
| # Run every Sunday at 6 AM UTC | |
| - cron: '0 6 * * 0' | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| update-dependencies: | |
| name: Update Dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Check for outdated packages | |
| id: outdated | |
| run: | | |
| npm outdated --json > outdated.json || true | |
| if [ -s outdated.json ]; then | |
| echo "has_updates=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_updates=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Update dependencies | |
| if: steps.outdated.outputs.has_updates == 'true' | |
| run: | | |
| npm update | |
| - name: Run tests after update | |
| if: steps.outdated.outputs.has_updates == 'true' | |
| run: | | |
| npm run quality-check | |
| - name: Create Pull Request | |
| if: steps.outdated.outputs.has_updates == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'chore: update dependencies' | |
| title: 'chore: automated dependency updates' | |
| body: | | |
| This PR contains automated dependency updates. | |
| - Dependencies have been updated to their latest compatible versions | |
| - All tests and quality checks have passed | |
| - Please review the changes before merging | |
| branch: automated-dependency-updates | |
| delete-branch: true |