name: Refresh BESS list snapshot on: schedule: # Daily at 02:00 UTC (~12:00 AEST). AEMO publishes Gen Info updates monthly, # so most days produce no diff. - cron: "0 2 * * *" workflow_dispatch: {} permissions: contents: write jobs: refresh: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: master - uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install minimal deps run: pip install --no-cache-dir httpx==0.27.* openpyxl==3.1.* - name: Refresh snapshot run: python scripts/refresh_bess_list.py - name: Commit if changed run: | set -e # Only commit if the parsed JSON changed. The meta file changes every # run (timestamp); committing it alone would churn master without # delivering new data. if git diff --quiet -- app/data/bess_list.json; then echo "No change in bess_list.json; skipping commit." exit 0 fi git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add app/data/bess_list.json app/data/bess_list_meta.json git commit -m "Refresh BESS list snapshot from AEMO XLSX" git push origin master