Skip to content

ci(release): dispatch the image build for a tag that already has a release - #967

Merged
cameri merged 3 commits into
mainfrom
ci/release-dispatch
Oct 24, 2026
Merged

cameri merged 3 commits into
mainfrom
ci/release-dispatch

Conversation

@chappie-daemon

Copy link
Copy Markdown
Collaborator

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.0 is published and immutable. Trying to re-publish it to re-trigger the now-fixed build fails:

immutable cannot be changed when release is immutable

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_dispatch with a tag input, so an image can be built for a tag whose release already exists.
  • The tag is checked, not trusted: nostream@* or v*, or the step exits with not a relay release tag. On a dispatch, github.event.release.tag_name is empty, so the input is the only thing between a typo and a pushed image.
  • The prerelease flag is derived from the version when the event has none, so dispatching nostream@3.8.0-rc.1 still leaves latest alone.

Verification

The gate test previously translated only startsWith(...) clauses and now also understands github.event_name == '…'; any clause form it cannot translate throws, so a future change to that condition fails the test rather than passing silently.

✔ builds a dispatched tag with the same tags as the release event
✔ reads a prerelease out of a dispatched tag
✔ refuses a dispatched tag that is not a relay release
✔ accepts a dispatched run so a failed build can be retried
13 passing

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.0 and confirm 3.7.0 and latest land in GHCR — the first end-to-end run of the fixed workflow.

…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-bot

changeset-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 34fc38c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
nostream Patch
nostream-website Patch

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

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Adds a manual image build for an existing release tag.

  • Operators can rebuild a release image by supplying its tag.

The previous checkout finding is fixed: dispatch now selects refs/tags/…, and the image build uses that checkout.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Published release] --> C[Choose release tag]
  B[Manual dispatch with tag] --> C
  C --> D[Check out tag]
  D --> E[Check tag and compute image tags]
  E --> F[Build from checked-out files]
  F --> G[Push version tags]
  G --> H{Stable release?}
  H -->|Yes| I[Also push latest]
  H -->|No| J[Leave latest unchanged]
Loading

Reviews (3) · Last reviewed commit: "Merge branch 'main' into ci/release-disp..." · Reviewed by Greptile

Comment thread .github/workflows/release.yml
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.
@coveralls

coveralls commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 40098614375

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Warning

No base build found for commit 98bd234 on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 75.452%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 11286
Covered Lines: 8906
Line Coverage: 78.91%
Relevant Branches: 5848
Covered Branches: 4022
Branch Coverage: 68.78%
Branches in Coverage %: Yes
Coverage Strength: 802.04 hits per line

💛 - Coveralls

@cameri
cameri merged commit 9c736c8 into main Oct 24, 2026
4 checks passed
@cameri
cameri deleted the ci/release-dispatch branch October 24, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants