Dependency Updates #8
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: Dependency Updates | |
| on: | |
| schedule: | |
| - cron: '0 0 * * 0' # Weekly on Sunday at midnight | |
| workflow_dispatch: | |
| jobs: | |
| update-backend-dependencies: | |
| name: Update Backend Dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: List outdated packages | |
| run: | | |
| cd Backend | |
| dotnet list package --outdated | |
| - name: Update packages | |
| run: | | |
| cd Backend | |
| dotnet outdated --upgrade | |
| continue-on-error: true | |
| - name: Build and test | |
| run: | | |
| cd Backend | |
| dotnet build | |
| dotnet test | |
| continue-on-error: true | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'chore: update backend dependencies' | |
| title: 'chore: Update Backend Dependencies' | |
| body: | | |
| This PR updates backend dependencies to their latest versions. | |
| Please review the changes and ensure all tests pass before merging. | |
| branch: update-backend-deps | |
| labels: dependencies,backend | |
| update-frontend-dependencies: | |
| name: Update Frontend Dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Check for updates | |
| run: | | |
| cd Frontend | |
| npm outdated || true | |
| - name: Update dependencies | |
| run: | | |
| cd Frontend | |
| npx npm-check-updates -u | |
| npm install | |
| - name: Build and test | |
| run: | | |
| cd Frontend | |
| npm run build | |
| npm test -- --watchAll=false | |
| env: | |
| CI: true | |
| continue-on-error: true | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'chore: update frontend dependencies' | |
| title: 'chore: Update Frontend Dependencies' | |
| body: | | |
| This PR updates frontend dependencies to their latest versions. | |
| Please review the changes and ensure all tests pass before merging. | |
| branch: update-frontend-deps | |
| labels: dependencies,frontend | |
| dependabot-auto-merge: | |
| name: Auto-merge Dependabot PRs | |
| runs-on: ubuntu-latest | |
| if: github.actor == 'dependabot[bot]' | |
| steps: | |
| - name: Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Auto-merge minor and patch updates | |
| if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' | |
| run: gh pr merge --auto --merge "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |