Repository navigation
ci(release): dispatch the image build for a tag that already has a release - #967
Conversation
…lease A published release is immutable, so a failed image build cannot be retried by re-publishing the release that triggered it. Add workflow_dispatch with a tag input, refuse a tag that is not a relay release, and read the prerelease from the version when the event carries no release flags. The gate test learns the new clause form and throws on any clause it cannot translate, so a future change to the condition fails the test instead of passing silently.
🦋 Changeset detectedLatest commit: 34fc38c The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
[Medium impact] The PR appears safe to merge; no new actionable issues were found.
|
actions/checkout defaulted to the ref the workflow started on, so dispatching from main with tag=nostream@3.7.0 would have built main's HEAD and published it as the 3.7.0 image. Check out refs/tags/<input> when an input is present and fall back to the event's own ref, which for a release is already the tag. The test asserts the shape of the expression: there is no GitHub expression engine here to execute it, and the mapping is what the reviewer flagged.
Coverage Report for CI Build 40098614375Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Warning No base build found for commit Coverage: 75.452%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats💛 - Coveralls |
Follows #965. #964's release still has no image, and it cannot get one through the event that was supposed to build it.
Why this is needed
nostream@3.7.0is published and immutable. Trying to re-publish it to re-trigger the now-fixed build fails:So a release whose image build fails has no recovery path at all — not for this one, and not for the next. The workflow only listened to
release: published.What changed
workflow_dispatchwith ataginput, so an image can be built for a tag whose release already exists.nostream@*orv*, or the step exits withnot a relay release tag. On a dispatch,github.event.release.tag_nameis empty, so the input is the only thing between a typo and a pushed image.nostream@3.8.0-rc.1still leaveslatestalone.Verification
The gate test previously translated only
startsWith(...)clauses and now also understandsgithub.event_name == '…'; any clause form it cannot translate throws, so a future change to that condition fails the test rather than passing silently.The tag cases execute the step's own
run:block, so they test the workflow that ships rather than a copy of its logic.After this merges
I will dispatch it with
tag=nostream@3.7.0and confirm3.7.0andlatestland in GHCR — the first end-to-end run of the fixed workflow.