CI: publish versioned images on GitHub Release (fixes #194)#195
Conversation
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).
|
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
left a comment
There was a problem hiding this comment.
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
Addresses #194.
Right now the container registry only ever gets a
latesttag, 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 onv*tag pushes, but the tags here are2.1.2,beta-3.0,3.0(nov), so those builds never fire. Meanwhilemain/v3.0pushes publish:latest, so:latestends up tracking the tip of main rather than a release.This moves image publishing onto the GitHub Release event.
What changes:
v3.2.0produces3.2.0,3.2, and3.:latestmoves only when the release is a full (non-prerelease) release.3.2.0-beta1) but leave:latestuntouched.devbranch keeps publishing:devas a rolling test channel.vprefix on the tag is optional now. metadata-action strips it, sov3.2.0and3.2.0both build the3.2.0image.One behavior change worth calling out:
main/v3.0pushes no longer publish:latest.:latestnow 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:
v3.2.0, leave "pre-release" unchecked.3.2.0,3.2,3, andlatest.For a beta, check "pre-release" and tag it
v3.2.0-beta1. That publishes3.2.0-beta1and leaveslatestalone.If you'd prefer a rolling image for
mainas well, I can add an:edgetag on main pushes. I left it out to keeplatestmeaning "stable release."