Download Speedometer Alerts #48
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: Download Speedometer Alerts | |
| on: | |
| schedule: | |
| - cron: '0 */3 * * *' # Runs every 3 hours. | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: download-speedometer-alerts | |
| cancel-in-progress: false | |
| jobs: | |
| download-speedometer-alerts: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Download Speedometer alert cache | |
| run: node scripts/fetch-speedometer-alerts.mjs | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add speedometer-alerts.json | |
| if git diff --cached --quiet; then | |
| echo "No Speedometer alert changes" | |
| exit 0 | |
| fi | |
| git commit -m "Update Speedometer alert cache" | |
| git push |