Refresh Model Radar #116
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: Refresh Model Radar | |
| on: | |
| schedule: | |
| - cron: "12 22 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: model-radar-refresh | |
| cancel-in-progress: false | |
| jobs: | |
| refresh: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Verify before refresh | |
| run: npm test | |
| - name: Refresh provider and benchmark source snapshot | |
| env: | |
| MODEL_RADAR_DELAY_MS: "1800" | |
| run: npm run update | |
| - name: Verify after refresh | |
| run: npm test | |
| - name: Commit snapshot if changed | |
| shell: bash | |
| run: | | |
| if git diff --quiet -- src/model-radar-snapshot.mjs; then | |
| echo "No snapshot changes." | |
| exit 0 | |
| fi | |
| git config user.name "model-radar-bot" | |
| git config user.email "model-radar-bot@users.noreply.github.com" | |
| git add src/model-radar-snapshot.mjs | |
| git commit -m "chore: refresh model radar snapshot" | |
| git push |