Skip to content

Merge pull request #7 from adewale/claude/project-elevation-opportuni… #2

Merge pull request #7 from adewale/claude/project-elevation-opportuni…

Merge pull request #7 from adewale/claude/project-elevation-opportuni… #2

name: Regenerate generated files
# Merges made through the GitHub UI bypass the local git hooks that keep
# src/asset_manifest.py and friends in sync, so a merge to main can land with
# stale generated files (and a red Verify run). This workflow regenerates them
# and pushes a fix-up commit. Pushes made with GITHUB_TOKEN do not trigger
# other workflows, so the fix-up commit is not re-verified by CI; it only ever
# contains deterministic `make build` output.
on:
push:
branches:
- main
permissions:
contents: write
concurrency:
group: regenerate-generated-files
cancel-in-progress: false
jobs:
regenerate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Regenerate embedded examples and fingerprinted assets
run: make build
- name: Commit and push regenerated files if they drifted
run: |
git add -A src/example_sources_data.py src/asset_manifest.py public
if git diff --cached --quiet; then
echo "Generated files are current."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "Regenerate fingerprinted assets"
git pull --rebase origin main
git push origin main