ci: publish on bundled-data changes + workflow_dispatch trigger#95
ci: publish on bundled-data changes + workflow_dispatch trigger#95bk86a wants to merge 2 commits into
Conversation
…dispatch The publish job uses a path filter to skip on docs-only changes, but the filter was excluding two files that ARE bundled into the container image via the Dockerfile: - tercet_missing_codes.csv (estimates fallback table) - docker-entrypoint.sh (the actual ENTRYPOINT) Consequence: PR #93 (CSV-only data update) was merged but `publish` skipped, so `ghcr.io/.../:latest` still pointed at the previous image without the 38 new postcodes and the LT 71205 fix. Same risk applies to any future entrypoint-only change. Adds both files to the `code:` filter so a fresh image is published on merge. Also adds `workflow_dispatch` so the publish flow can be re-triggered manually from the Actions UI (or `gh workflow run`) without needing an empty commit dance; updates the `publish` job's `if` to allow that event type as well. Side effect of this PR landing: triggers a fresh image build that picks up #93's CSV update, so the next redeploy from `:latest` will ship both the v0.19.3 deps and the data update. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
87966ef to
2f55251
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f552516fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| publish: | ||
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changes.outputs.code == 'true' | ||
| if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' && needs.changes.outputs.code == 'true' |
There was a problem hiding this comment.
Let manual dispatch bypass the change filter
For workflow_dispatch runs on main, dorny/paths-filter still computes needs.changes.outputs.code from the selected ref's last commit, so a manual rebuild after a docs-only last commit (or any rebuild that is needed without a new code diff) will skip publish because this condition remains false. That keeps the newly added manual trigger from replacing the empty-commit workaround in those cases; consider making workflow_dispatch publish independent of the path-filter result or forcing the filter output true for manual runs.
Useful? React with 👍 / 👎.
Codex flagged on #95: dorny/paths-filter still evaluates against the selected ref's last commit for workflow_dispatch runs, so a manual rebuild after a docs-only last commit would skip publish — defeating the point of adding the manual trigger as a replacement for the empty- commit dance. Split the condition: workflow_dispatch on main always publishes; push to main still publishes only when a code-relevant file changed. The push branch keeps the noise-reduction filter we already wanted; the manual branch trusts the operator to know they want a rebuild. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Good catch — fixed in 82a5583. The bot is right: Split the condition so:
|
Summary
Fixes a CI-paths-filter bug that caused PR #93 to merge without triggering a fresh container publish. Two files that the
DockerfileCOPYs into the image were missing from thechangesfilter:tercet_missing_codes.csv— the bundled estimates fallback tabledocker-entrypoint.sh— the actual containerENTRYPOINTA CSV-only or entrypoint-only change should rebuild the image, because both files affect what ships in
ghcr.io/.../:latest. Adds them to the filter.Also adds
workflow_dispatchto the workflow triggers and to thepublishjob'sifcondition, so future manual rebuilds don't require an empty-commit dance.Consequence on merge
Triggers a fresh image build that includes #93's CSV update (38 new postcodes + the LT 71205 → LT024 correction). After this merges,
:latestwill carry both the v0.19.3 deps and the latest data.Test plan
gh run list --workflow ci.yml --branch main --limit 1shows thepublishjob ran (not skipped)ghcr.io/bk86a/PostalCode2NUTS:latestpoints at the new SHA🤖 Generated with Claude Code