Skip to content

CI: publish versioned images on GitHub Release (fixes #194)#195

Merged
Brandon-Haney merged 1 commit into
StudioNirin:mainfrom
Brandon-Haney:ci/release-driven-image-publishing
Jul 12, 2026
Merged

CI: publish versioned images on GitHub Release (fixes #194)#195
Brandon-Haney merged 1 commit into
StudioNirin:mainfrom
Brandon-Haney:ci/release-driven-image-publishing

Conversation

@Brandon-Haney

Copy link
Copy Markdown
Collaborator

Addresses #194.

Right now the container registry only ever gets a latest tag, and the "Latest" badge on the Releases page is stuck on 2.1.2 while 3.2.0 sits as a pre-release. The cause is in the CI trigger: semver images only build on v* tag pushes, but the tags here are 2.1.2, beta-3.0, 3.0 (no v), so those builds never fire. Meanwhile main/v3.0 pushes publish :latest, so :latest ends up tracking the tip of main rather than a release.

This moves image publishing onto the GitHub Release event.

What changes:

  • Publishing a release builds semver image tags from the release tag. v3.2.0 produces 3.2.0, 3.2, and 3.
  • :latest moves only when the release is a full (non-prerelease) release.
  • Pre-releases still build and publish their full tag (e.g. 3.2.0-beta1) but leave :latest untouched.
  • The dev branch keeps publishing :dev as a rolling test channel.
  • The v prefix on the tag is optional now. metadata-action strips it, so v3.2.0 and 3.2.0 both build the 3.2.0 image.

One behavior change worth calling out: main/v3.0 pushes no longer publish :latest. :latest now means the current stable release, which keeps it in sync with the Releases page and gives compose/IaC users something stable to pin. Pushes to those branches still run the test job, they just don't publish an image.

Cutting a release after this merges:

  1. Create a GitHub Release with tag v3.2.0, leave "pre-release" unchecked.
  2. CI runs the tests, then publishes 3.2.0, 3.2, 3, and latest.

For a beta, check "pre-release" and tag it v3.2.0-beta1. That publishes 3.2.0-beta1 and leaves latest alone.

If you'd prefer a rolling image for main as well, I can add an :edge tag on main pushes. I left it out to keep latest meaning "stable release."

Build and publish Docker images from the published-release event instead
of branch pushes and bare v* tag pushes. Publishing a release now builds
semver image tags (3.2.0, 3.2, 3) from the release tag and moves :latest
only for non-prerelease releases. Pre-releases publish their full semver
tag without moving :latest. The dev branch still publishes :dev as a
rolling test channel.

This couples image publishing to the Releases page so the container tags
and the "Latest" release stay in sync, and gives compose/IaC users a
version-pinnable tag instead of only :latest. The v prefix on the release
tag is now optional (metadata-action strips it either way).
@Brandon-Haney

Copy link
Copy Markdown
Collaborator Author

One thing this doesn't do on its own is create the first versioned image. Once it merges, someone still has to publish a Release for v3.2.0 before the 3.2.0/3.2/3/latest tags show up, and that's also what clears the stale Latest badge on the releases page.

Happy to cut that one for you if you want. I'd tag v3.2.0 off main with proper release notes, left un-prereleased so it lands as latest. If you'd rather do it yourself that's completely fine, just let me know which way you want to go. I won't publish anything without your ok.

@StudioNirin StudioNirin left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't get a chance to write up a changenotes or release docs for a couple days as I'm in the middle of a website rebuild, so I'm happy for you to go ahead. Let me know if there's anything I can do that would be helpful

@Brandon-Haney Brandon-Haney merged commit 7211230 into StudioNirin:main Jul 12, 2026
2 checks passed
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.

2 participants