Repository navigation
fix(ci): do not publish latest image tags for prerelease versions - #978
Merged
Merged
Conversation
A prerelease tag such as v2.0.0-beta.1 matched the latest and latest-<image> rules, which only checked for a v* tag ref. Deployments that track :latest would pull a prerelease on their next update. Require the tag to contain no '-' so only stable vX.Y.Z tags publish latest. The semver rules already publish only the full version for prereleases.
docker/metadata-action already skips these for prerelease versions; the explicit guard keeps a beta tag from ever moving :2, :2.0, or their per-image variants if that behavior changes.
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stops prerelease tags from publishing the
latestandlatest-<image>Docker tags. Needed before taggingv2.0.0-beta.1frombeta: today anyv*tag enables those rules, so a beta prerelease would replace:latest, which production deployments track.Type of Change
Related Issues
Related to #965
Changes Made
.github/workflows/docker-build.yaml: thelatest-<image>andlatestraw tag rules also require!contains(github.ref, '-'). Stable tags (v1.76.5) contain no-; prerelease tags (v2.0.0-beta.1) do.{{major}}and{{major}}.{{minor}}semver rules (plain and per-image) get the same guard. docker/metadata-action already emits only{{version}}for prerelease versions; the explicit guard keeps a beta tag from moving:2or:2.0if that behavior changes. Thebetabranch push still publishes:betaandbeta-<image>.Testing
actionlint .github/workflows/docker-build.yamlclean; YAML parses. The first real check is thev2.0.0-beta.1tag run: its published tags must be2.0.0-beta.1and2.0.0-beta.1-<image>only.Checklist
Review: required (release publishing behavior changes on merge with no separate deploy step)