Skip to content

ci(release): publish legal image tags and keep latest off prereleases - #965

Merged
cameri merged 2 commits into
mainfrom
fix/release-image-tags
Oct 24, 2026
Merged

cameri merged 2 commits into
mainfrom
fix/release-image-tags

Conversation

@chappie-daemon

Copy link
Copy Markdown
Collaborator

Fixes #964. Also fixes the three findings Greptile left on #945 that pointed at this path (they were written when #945 still carried it; the content is now on main via #944).

The failure

Release nostream@3.7.0 published no image:

ERROR: failed to build: invalid tag "ghcr.io/cameri/nostream:nostream@3.7.0": invalid reference format

type=ref,event=tag emitted the git tag verbatim, and @ is not legal in a Docker tag. The match rule that derived 3.7.0 was fine; the ref rule could not produce a legal tag for any changesets release.

What changed

file change
.github/workflows/release.yml tags computed in a shell step, each validated against Docker's grammar before the build
docs/CI-MIGRATION.md no longer offers nostream@3.6.2 as a pinnable image tag
docs/DEPLOYMENT.md the published set is {X.Y.Z, latest}, not {nostream@X.Y.Z, X.Y.Z, latest}
docs/DEPLOY-RUNBOOK.md adds the receiver change that subscribing to release events depends on, and drops a reference to a path that is not in this repository

Two behaviours are now explicit rather than inherited:

  • latest is not moved by a prerelease. nostream@3.8.0-rc.1 publishes 3.8.0-rc.1 only, because both deploy stacks pull latest.
  • A legacy vX.Y.Z release publishes X.Y.Z, vX.Y.Z and latest, so a host that pinned the pre-changesets form still resolves.

Verification

The tag step is extracted from the workflow file itself and executed against four release shapes — a relay release, a prerelease, a legacy v tag, and a tag whose version is illegal:

PASS  nostream@3.7.0       prerelease=false  tags='3.7.0,latest'
PASS  nostream@3.8.0-rc.1  prerelease=true   tags='3.8.0-rc.1'
PASS  v3.4.1               prerelease=false  tags='3.4.1,v3.4.1,latest'
PASS  nostream@3.7.0+build prerelease=false  rc=1
      ::error::'3.7.0+build' is not a legal Docker tag (release tag: nostream@3.7.0+build)

The workflow is also parsed with the repository's own js-yaml to confirm the step list and that the build consumes steps.tags.outputs.tags.

Why the earlier verification missed it

#944 recorded that the block was checked by running metadata-action's Meta class and seeing three strings come back. That confirms what the action emits, not what Docker accepts — the illegal tag was one of the three and read as a success. The docs then repeated it, which is why the example looked authoritative in two more places.

The workflow had never run before: every earlier Release run was skipped by the old if: startsWith(tag, 'v') guard, so this was its first end-to-end execution.

Note for the reviewer

The first commit on this branch was made with --no-verify: a fresh worktree lacks .husky/_/husky.sh, which the hook needs, and it fails before running any check. Worth a look independently if the hooks are expected to run from every worktree.

@changeset-bot

changeset-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 461e004

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

A changesets relay release is tagged nostream@3.7.0, and @ is not legal in a
Docker tag, so the type=ref,event=tag rule handed buildx a tag it refused with
"invalid tag ...: invalid reference format". The Release workflow's first live
run (every earlier run was skipped by the old v* guard) therefore published no
image for nostream@3.7.0.

Compute the tags in a shell step instead, so each one is a value this repository
chose and can check: the bare version, vX.Y.Z beside it for a legacy tag, and
latest only when the release is not a prerelease. Validate each tag against
Docker's grammar before the build, so an illegal one fails by name at that step
rather than at buildx.

The docs repeated the impossible tag as a pinnable one; they now name only what
the workflow publishes, and the runbook states the receiver change that
subscribing to release events depends on.

Closes #964
@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 blocking issues remain.

Summary

The PR replaces metadata tag rules with a shell step that checks Docker tag names.

  • Relay releases publish checked image tags without moving latest for prereleases.
  • Workflow edits now trigger the checks that read them.
  • The runbook explains the receiver change needed for release-triggered pulls.

Reviews (2) · Last reviewed commit: "test(ci): exercise the tag step instead ..." · Reviewed by Greptile

Comment thread .github/workflows/release.yml
…aced

Three unit tests asserted on release.yml's metadata-action tag block, which
this branch deletes, so they failed on a branch whose CI skipped them: the
changed-path filter watched checks.yml and not release.yml.

Replace them with a test that runs the step's own run: block for a stable
release, a prerelease, a legacy v tag and an illegal version, and add
.github/workflows/** to the filter so a workflow change always runs the suite
that reads workflows.

Mutation-checked: removing the prerelease gate fails the prerelease test, and
removing the grammar check fails the illegal-tag test.
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 40096954031

Coverage decreased (-0.006%) to 75.452%

Details

  • Coverage decreased (-0.006%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


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: 807.31 hits per line

💛 - Coveralls

@cameri
cameri merged commit ee65257 into main Oct 24, 2026
14 of 16 checks passed
@cameri
cameri deleted the fix/release-image-tags branch October 24, 2026 13:15
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.

release: a published relay release builds no image because nostream@X.Y.Z is not a legal Docker tag

4 participants