Skip to content

fix(ci): do not publish latest image tags for prerelease versions - #978

Merged
Starosdev merged 2 commits into
betafrom
ci/965-prerelease-no-latest
Oct 13, 2026
Merged

Starosdev merged 2 commits into
betafrom
ci/965-prerelease-no-latest

Conversation

@Starosdev

@Starosdev Starosdev commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Stops prerelease tags from publishing the latest and latest-<image> Docker tags. Needed before tagging v2.0.0-beta.1 from beta: today any v* tag enables those rules, so a beta prerelease would replace :latest, which production deployments track.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or infrastructure change

Related Issues

Related to #965

Changes Made

  • .github/workflows/docker-build.yaml: the latest-<image> and latest raw tag rules also require !contains(github.ref, '-'). Stable tags (v1.76.5) contain no -; prerelease tags (v2.0.0-beta.1) do.
  • The {{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 :2 or :2.0 if that behavior changes. The beta branch push still publishes :beta and beta-<image>.

Testing

  • I have tested this locally
  • I have added/updated tests that prove my fix/feature works
  • All existing tests pass

actionlint .github/workflows/docker-build.yaml clean; YAML parses. The first real check is the v2.0.0-beta.1 tag run: its published tags must be 2.0.0-beta.1 and 2.0.0-beta.1-<image> only.

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my code
  • I have commented my code where necessary (particularly complex areas)
  • I have updated the documentation if needed
  • My changes generate no new warnings

Review: required (release publishing behavior changes on merge with no separate deploy step)

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.
@Starosdev Starosdev added infrastructure CI/CD and infrastructure docker Docker/container related labels Oct 13, 2026
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.
@Starosdev
Starosdev merged commit b7c110f into beta Oct 13, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker/container related infrastructure CI/CD and infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant