You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider pushing the latest tag for the docker image #2173
cidockerPull requests that update docker codeenhancementNew feature or requesthelp wantedExtra attention is neededtriageNew issues or PRs to be acknowledged by maintainers
Took a look at what this would involve. The report is accurate — nothing in the release pipeline ever writes latest.
Current state
release-ghcr.yml derives the image tag directly from the git ref:
TAG=${GITHUB_REF#refs/*/}# get branch or tag as image tag
So we publish exactly :main on merges to main and :v1.3.4 on tag pushes, and no rolling tags of any kind.
Two things that make this more than a one-liner
Prereleases are built.v1.3.0-rc.1, -beta.4, etc. all match tags: [v*], so a naive "every tag push moves latest" would publish an RC as latest.
Releases come off maintenance branches (release-1.0 … release-1.3). A future v1.2.5 backport released afterv1.3.0 would push latest (and v1) backwards to an older release. This needs an "is this the highest stable tag" guard, not just "is this a tag push".
Worth flagging: docker/metadata-action's flavor: latest=auto does not handle case 2 — it only checks prerelease-ness. So a shell guard is needed regardless of whether we adopt that action.
Proposed tag contract
Tag
Moves?
Intended use
sha256:…
never
reproducible / attested builds — recommended
v1.3.4
never
pinned installs
v1.3
patches only
conservative automation
v1
within the major line
recommended for CI
latest
anything, including major bumps
interactive / exploratory use
main
every merge
development builds, unsupported
Recommendation: ship latest + v{major} + v{major}.{minor} together
They solve different problems and the marginal cost of the second and third is near zero — it's one git tag | sort -V computation with three filters (highest stable overall / highest in major / highest in minor). That framing also gets the backport case right for free: a v1.2.5 after v1.3.0 moves v1.2 and nothing else.
latest alone would be the worst outcome. It's the tag that silently jumps major versions, and without v1 we'd have no bounded alternative to point CI users at — which is the use case actually named in this issue.
Conversely, v1 alone leaves the original complaint unfixed: docker pull ghcr.io/oras-project/oras with no tag resolves to :latest and nothing else makes that work.
On the supply-chain concern about publishing mutable tags — we already publish :main on every merge, so that ship has sailed. The thing that actually bites users is undocumented mutability, which is why the table above is arguably the more important half of this change.
Implementation sketch
Add fetch-depth: 0 (or fetch-tags: true) to the checkout — git tag isn't populated in the job today, so no tag comparison is possible as written.
Rewrite the prepare step to emit a tag list rather than a single ref, with the stable/prerelease and highest-tag guards.
Pass the list as repeated -t flags to the existing single buildx build --push so all tags share one manifest list and one build.
If we use docker/metadata-action, use pattern=v{{version}} — the default {{version}} emits 1.3.4 without the v, which would silently fork our tag naming.
Document the contract in the README.
One decision worth settling now
While there's no v2 on the horizon: when 2.0.0 ships, does latest jump to it immediately? Convention says yes — which is precisely why automation should be on v1. Easier to decide now than during a v2 release crunch.
I can put up a PR if there's agreement on the policy.
Opened #2184 with the rolling-tag workflow and the README tag contract. It keeps latest, vX, and vX.Y on the highest stable release and prevents prereleases or backports from moving them backwards.
cidockerPull requests that update docker codeenhancementNew feature or requesthelp wantedExtra attention is neededtriageNew issues or PRs to be acknowledged by maintainers
Activity
TerryHowe commentedon Sep 18, 2026
Took a look at what this would involve. The report is accurate — nothing in the release pipeline ever writes
latest.Current state
release-ghcr.ymlderives the image tag directly from the git ref:So we publish exactly
:mainon merges to main and:v1.3.4on tag pushes, and no rolling tags of any kind.Two things that make this more than a one-liner
v1.3.0-rc.1,-beta.4, etc. all matchtags: [v*], so a naive "every tag push moveslatest" would publish an RC aslatest.release-1.0…release-1.3). A futurev1.2.5backport released afterv1.3.0would pushlatest(andv1) backwards to an older release. This needs an "is this the highest stable tag" guard, not just "is this a tag push".Worth flagging:
docker/metadata-action'sflavor: latest=autodoes not handle case 2 — it only checks prerelease-ness. So a shell guard is needed regardless of whether we adopt that action.Proposed tag contract
sha256:…v1.3.4v1.3v1latestmainRecommendation: ship
latest+v{major}+v{major}.{minor}togetherThey solve different problems and the marginal cost of the second and third is near zero — it's one
git tag | sort -Vcomputation with three filters (highest stable overall / highest in major / highest in minor). That framing also gets the backport case right for free: av1.2.5afterv1.3.0movesv1.2and nothing else.latestalone would be the worst outcome. It's the tag that silently jumps major versions, and withoutv1we'd have no bounded alternative to point CI users at — which is the use case actually named in this issue.Conversely,
v1alone leaves the original complaint unfixed:docker pull ghcr.io/oras-project/oraswith no tag resolves to:latestand nothing else makes that work.On the supply-chain concern about publishing mutable tags — we already publish
:mainon every merge, so that ship has sailed. The thing that actually bites users is undocumented mutability, which is why the table above is arguably the more important half of this change.Implementation sketch
fetch-depth: 0(orfetch-tags: true) to the checkout —git tagisn't populated in the job today, so no tag comparison is possible as written.preparestep to emit a tag list rather than a single ref, with the stable/prerelease and highest-tag guards.-tflags to the existing singlebuildx build --pushso all tags share one manifest list and one build.docker/metadata-action, usepattern=v{{version}}— the default{{version}}emits1.3.4without thev, which would silently fork our tag naming.One decision worth settling now
While there's no v2 on the horizon: when
2.0.0ships, doeslatestjump to it immediately? Convention says yes — which is precisely why automation should be onv1. Easier to decide now than during a v2 release crunch.I can put up a PR if there's agreement on the policy.
afbjorklund commentedon Sep 20, 2026
ci: publish stable rolling image tags (oras-project#2173)
docs: document container image tag policy (oras-project#2173)
Soundcreates commentedon Sep 21, 2026
Opened #2184 with the rolling-tag workflow and the README tag contract. It keeps
latest,vX, andvX.Yon the highest stable release and prevents prereleases or backports from moving them backwards.ci(release): publish stable rolling image tags
ci: publish stable rolling image tags (oras-project#2173)
ci: publish stable rolling image tags (oras-project#2173)