Gate the pin-push publish through a single release-plan job - #138
Merged
Conversation
…y, bot merges) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the release publishing workflow for this Docker-only repo to gate push-triggered publishes through a centralized “plan” job, aligning publish behavior with the intended release model (only bot-authored upstream pin pushes to main publish; develop publishes via dispatch).
Changes:
- Add a reusable
publish-plan-task.ymlworkflow that decides whether a run should publish and whether it targets the stable channel. - Update
publish-release.ymlto call the plan workflow and gate thepublishjob onneeds.plan.outputs.publish == 'true'. - Narrow the push trigger for upstream pin changes to
mainonly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/publish-release.yml | Adds the plan gate and narrows push-triggered publishing to main only. |
| .github/workflows/publish-plan-task.yml | Introduces centralized publish/stable decision logic for publish workflows. |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
publish-release.yml's push trigger wasbranches: [main, develop], so a pin bump on either branch published. That contradicted the documented model in three places -WORKFLOW.mdsection 3 states outright that "the develop pin update is sync-only (the push trigger ismain-only), so develop never auto-publishes", and both the D4 guarantee and its 5A audit row assertbranches: [main]. In practicedeveloppublished a prerelease on every pin bump (07-09 through 07-18), so the contract and the implementation had disagreed for weeks.What
Narrow the push trigger to
branches: [main], which is what the contract already claimed.Add
publish-plan-task.yml, a single job that owns the release-gate decision.publishnow gates onneeds.plan.outputs.publish == 'true'rather than re-testing the event and ref in its ownif:. The task publishes for a schedule, for a dispatch ofmain/develop, and for a push tomainby the codegen App or Dependabot - so the tracker's auto-merged pin bump releases, while a hand-edited pin does not.The actor allowlist was verified, not assumed: every push-triggered publish run on this repo carries
actor=ptr727-codegen[bot].Document it. The original change added a workflow and a gating mechanism with no contract update, which D9.5 treats as decorative by default. This adds:
'true'/'false'so callers must compare explicitlyif:) and 5A audit rowstableis intentionally unused here -inputs.branchalready carries main-vs-develop - and D4.9 records that an unused output is expected of a task shared across repo types.Known limitation
The actor allowlist is a hardcoded identity, so if that identity ever changes the gate closes silently: pin pushes stop publishing, nothing errors, and the weekly schedule keeps releasing, leaving "upstream ships up to a week late" as the only symptom. Raised upstream with a recommended fix (annotate a non-publishing pin push rather than skipping quietly).
Verification
develop;developmerged in rather than rebased, per the no-force-push rule.branches: [main]after the merge.