Skip to content
This repository was archived by the owner on Apr 26, 2026. It is now read-only.

Generate Incidents JSON #9

Generate Incidents JSON

Generate Incidents JSON #9

name: Generate Incidents JSON
on:
schedule:
- cron: '0 0 * * *' # Everyday at midnight (UTC)
workflow_dispatch: {}
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Run generator
run: node generate-incidents.js
- name: Commit and push if changed
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add all-blockchain-incidents.json
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Update incidents JSON $(date -u +%Y-%m-%d)"
git push
fi