This repository was archived by the owner on Apr 26, 2026. It is now read-only.
Fetch Cloud Incidents #2
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: Generate Cloud Incidents JSON | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" # every midnight | |
| permissions: | |
| contents: write | |
| jobs: | |
| fetch-incidents: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: | | |
| npm install xml2js | |
| - name: Run incident fetcher | |
| run: | | |
| node scripts/fetch-cloud-incidents.js | |
| - name: Commit updated incidents file | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git add cloud-incidents.json | |
| git commit -m "Update cloud incidents data" || echo "No changes" | |
| git push |