Update Baselines #15
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 Baselines | |
| # Run weekly on Tuesdays at 2 AM UTC | |
| on: | |
| schedule: | |
| - cron: '0 2 * * 2' | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| update-baselines: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Use Node.js 22.x | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22.x | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Regenerate baselines | |
| run: npm run test:baselines | |
| env: | |
| TESTING: true | |
| - name: Check for changes | |
| id: check_changes | |
| run: | | |
| if git diff --quiet test/baselines; then | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Pull Request | |
| if: steps.check_changes.outputs.has_changes == 'true' | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'Update baselines after dependency changes' | |
| branch: automated/update-baselines | |
| delete-branch: true | |
| title: 'Update baselines after dependency changes' | |
| body: | | |
| This PR was automatically created by the weekly baseline update workflow. | |
| The baselines have been regenerated to reflect recent dependency updates or other changes. | |
| Please review the changes to ensure they are expected. | |
| assignees: Apollon77 |