Skip to content

Download Speedometer Alerts #48

Download Speedometer Alerts

Download Speedometer Alerts #48

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