Skip to content

Consider pushing the latest tag for the docker image #2173

Closed

Description

@lwbt

What is the version of your ORAS CLI

v1.3.4

What would you like to be added?

This should work:

docker pull ghcr.io/oras-project/oras:latest

https://github.com/orgs/community/discussions/23606

The latest tag isn’t automatic, you need to push it like any other tag.

Having these options work would also be nice:

docker pull ghcr.io/oras-project/oras:v1.3
docker pull ghcr.io/oras-project/oras:v1

Why is this needed for ORAS?

Convenience for users and CI pipelines.

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.

Activity

  1. added
    enhancement
    triage
    on Sep 16, 2026
  2. TerryHowe commented on Sep 18, 2026

    @TerryHowe
    Member

    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

    1. 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.
    2. Releases come off maintenance branches (release-1.0 … release-1.3). A future v1.2.5 backport released after v1.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.

  3. added
    docker
    help wanted
    on Sep 18, 2026
  4. afbjorklund commented on Sep 20, 2026

    @afbjorklund
  5. Soundcreates commented on Sep 21, 2026

    @Soundcreates
    Contributor

    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.

  6. added 2 commits that reference this issue on Sep 22, 2026
    577df59
    8f06db2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cidockerenhancementhelp wantedtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions