Repository navigation
Description
Problem
The publish job tags each manifest list with the date tag YYYYMMDD. Each push to main and the daily rebuild publish a new manifest list, so the date tag moves to a new digest more than once on most days. On 2026-11-20, seven runs on main published, and the tag 20261120 moved seven times. Each move leaves the earlier manifest list with no tag.
The devops-cli devcontainer and Job images pin such digests. A tag that moves does not identify one image, and a later clean-up of untagged versions would delete digests that consumers pin.
Change
- Each publish gets a tag that no later publish reuses, with the date first so that the tags sort by date.
- The label
org.opencontainers.image.versionof each platform image has the same value as that tag. - The publish job stops when the tag already points to a different digest.
latestmoves as before, after the attestation.
Proof
- Two publishes on one day give two tags, and each tag keeps its digest.
skopeo inspectof a pushed platform image shows the new tag inorg.opencontainers.image.version.
Proposed design
Problem statement
The publish workflow reuses the date tag YYYYMMDD for every publish. The tag moves to a new digest more than once a day. Consumers pin digests, and a clean-up can delete the earlier untagged digests. The change gives each publish an immutable date-first tag, keeps org.opencontainers.image.version equal to that tag, and stops a publish that would move an existing tag.
Acceptance criteria
Requirement: Immutable date-first tag
The publish workflow SHALL give each publish a unique tag that starts with the UTC date and SHALL NOT publish the moving YYYYMMDD tag.
Scenario: Two publishes on one date
- WHEN Two publish runs start on 2026-11-20 in a clean registry with different run IDs
- THEN
docker buildx imagetools inspectshows the tags20261120-<run_id>-<attempt>and20261120-<run_id_2>-<attempt_2>with their original digests, anddocker buildx imagetools inspect <image>:20261120reports that the tag does not exist.
Requirement: Platform image version label
Each platform image SHALL set org.opencontainers.image.version to the same value as its immutable publish tag.
Scenario: Inspect a pushed platform image
- WHEN A publish pushes a platform image by digest with the immutable tag
20261120-<run_id>-<attempt> - THEN
skopeo inspect docker://<image>@<platform_digest>showsorg.opencontainers.image.versionequal to20261120-<run_id>-<attempt>.
Requirement: Existing tag guard
The publish job MUST stop before it moves an existing immutable tag to a different digest.
Scenario: Tag points to another digest
- WHEN The immutable tag already points to a digest that differs from the new manifest list
- THEN The publish job exits with a non-zero status, and
docker buildx imagetools inspect <image>:<immutable_tag>shows the original digest.
Requirement: Latest after attestation
The publish job SHALL move latest only after the attestation passes.
Scenario: Attestation succeeds
- WHEN The attestation step passes for the immutable tag
- THEN
docker buildx imagetools inspect <image>:latestshows the same digest as<image>:<immutable_tag>.
Requirement: Workflow validation
The image workflow MUST pass the project workflow checks.
Scenario: Workflow lint
- WHEN
uv run devops ci --check --only actionlint,zizmorruns - THEN The command exits 0 and reports no error for
.github/workflows/image.yml.
Existing Tool Considered
No alternatives check has run. The open and maintained docker/metadata-action covers the tag and label generation. It lacks a built-in date-first tag that is unique for each run, so the workflow uses a raw template with github.run_id and github.run_attempt. The open and maintained docker buildx imagetools covers digest inspection and manifest-list creation. It lacks an overwrite guard, so the workflow adds a short check before imagetools create. The change builds no separate library or tool.
Key questions
- Which tag format gives a unique date-first tag for every publish?: Use
YYYYMMDD-<github.run_id>-<github.run_attempt>. (best practice) [sources: .github/workflows/image.yml:222]- Chosen: Date, run ID and run attempt. The run ID is unique for each workflow run. The run attempt is unique for each rerun. The date comes first.
- Rejected: Date and timestamp. Two runs can start in the same second and then reuse a tag.
- Rejected: Date and commit SHA. A daily rebuild can publish the same commit again and reuse the tag.
- Rejected: Date and run ID only. A rerun of the same workflow run can publish again and reuse the tag.
- How does the publish job detect that a tag already points to a different digest?: Run
docker buildx imagetools inspecton the tag beforeimagetools create. Stop with a non-zero status when the tag exists and its digest differs. (best practice) [sources: .github/workflows/image.yml:442]- Chosen:
docker buildx imagetools inspect. The workflow already usesdocker buildx imagetools. The command reads the tag digest without a new tool. - Rejected:
skopeo inspect. It adds a tool to the publish job. The workflow does not use it for this check. - Rejected: Let
imagetools createoverwrite the tag. The overwrite moves the tag and loses the earlier digest.
- Chosen:
- Where does the version label get its value?: A
tagjob computes the immutable tag once from the UTC date,github.run_idandgithub.run_attempt. The platform build and publish jobs take the value from that job output. (best practice) [sources: .github/workflows/image.yml:222, .github/workflows/image.yml:412, README.md:116]- Chosen: One
tagjob output. The platform image and the manifest list get the same value. The date and run values cannot differ between jobs. - Rejected:
docker/metadata-actionversionoutput. The output depends on the tag order. An explicit value is clearer. - Rejected: A separate date command in each job. A run near midnight can get two dates. The label and the tag can differ.
- Chosen: One
- Does the workflow keep the moving
YYYYMMDDtag?: No. Remove the moving date tag. Keeplatestas the only moving tag. (best practice) [sources: .github/workflows/image.yml:222, .github/workflows/image.yml:412, README.md:126]- Chosen: Remove the moving date tag. The moving tag does not identify one image. It leaves earlier digests untagged.
- Rejected: Keep the moving date tag and add the immutable tag. The moving tag still moves and still leaves earlier digests untagged.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-20: in-use.
The repository already uses this tool.
Tool: docker/metadata-action (https://github.com/docker/metadata-action), Apache-2.0, last activity 2026-11-12, maintained.
Reason: Searches found docker/metadata-action, which generates tags and OCI labels, including org.opencontainers.image.version, from date and env templates, but offers no built-in run-unique tag or overwrite guard, so it covers only part of the need.
Covers:
- Tag and OCI label generation from GitHub events
- Raw tag templates with UTC date expressions
- Sets the org.opencontainers.image.version label
Lacks:
- No built-in run-unique date-first tag
- No guard against moving an existing tag
- No manifest list creation or attestation
Activity
dan-petty commentedon Nov 20, 2026
Both touch the org.opencontainers.image.version label in the CI publish job, but #6 fixes the label value while the candidate makes the tag itself unique per publish.devops-cli-service commentedon Nov 20, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Nov 20, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (4)
Tools considered:
Searches run:
Sources:
fix(ci): give each publish a tag that never moves
devops-cli-service commentedon Nov 22, 2026
Released in v1.0.0: https://github.com/dan-petty/devtools/releases/tag/v1.0.0