feat(image): publish the images under a semver tag #7

Merged
Defame1297 merged 2 commits from feat/image-semver into main 2026-10-25 11:45:53 +00:00
Owner

Why

Consumers should pin image:X.Y.Z@sha256:<digest>: the tag says which release it is, the digest is what is enforced. Until now the images had only sha-<12> and latest (plus the Collection's v* tag on tag pushes).

Change (.gitea/workflows/image.yml only)

  • A version: per image in the matrix (both start at 0.1.0), validated as MAJOR.MINOR.PATCH[-prerelease] (no +: not a valid OCI tag character). Image versions are independent of the Collection's releases: the ci image changes far more often.
  • Every build from main pushes sha-<12> and latest; the version tag is pushed only if it is not in the registry yet. Gitea cannot make a tag immutable, so the prepare step looks it up (HEAD /v2/<image>/manifests/<version> with the credential it already selected): 200 means published, so the tag is not moved and the job warns that the version needs bumping; 404 means free; anything else fails rather than guessing.
  • The printed Pinned reference is image:<version>@sha256:… when this build created the tag, else image@sha256:….
  • Removed: the v* tag trigger and the tag-name image tag. Floating 0.1 / 0 tags are deliberately not published (mutable; pinning is by digest).

Releasing a new image version

Bump version: of that image in the same PR as the change; the first build from main publishes it. A rebuild without a bump (a pin file change, or a base-image digest bump) only refreshes sha-<12> and latest.

After merge

The first run publishes 0.1.0 for both images, with new digests (images get a fresh creation time on each build), so the Lint/Build switch PR will pin those.

🤖 Generated with Claude Code

## Why Consumers should pin `image:X.Y.Z@sha256:<digest>`: the tag says which release it is, the digest is what is enforced. Until now the images had only `sha-<12>` and `latest` (plus the Collection's `v*` tag on tag pushes). ## Change (`.gitea/workflows/image.yml` only) - A `version:` per image in the matrix (both start at `0.1.0`), validated as `MAJOR.MINOR.PATCH[-prerelease]` (no `+`: not a valid OCI tag character). Image versions are independent of the Collection's releases: the ci image changes far more often. - Every build from `main` pushes `sha-<12>` and `latest`; the version tag is pushed only if it is not in the registry yet. Gitea cannot make a tag immutable, so the prepare step looks it up (`HEAD /v2/<image>/manifests/<version>` with the credential it already selected): 200 means published, so the tag is not moved and the job warns that the version needs bumping; 404 means free; anything else fails rather than guessing. - The printed `Pinned reference` is `image:<version>@sha256:…` when this build created the tag, else `image@sha256:…`. - Removed: the `v*` tag trigger and the tag-name image tag. Floating `0.1` / `0` tags are deliberately not published (mutable; pinning is by digest). ## Releasing a new image version Bump `version:` of that image in the same PR as the change; the first build from `main` publishes it. A rebuild without a bump (a pin file change, or a base-image digest bump) only refreshes `sha-<12>` and `latest`. ## After merge The first run publishes `0.1.0` for both images, with new digests (images get a fresh creation time on each build), so the Lint/Build switch PR will pin those. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Claude added 2 commits 2026-10-25 11:44:20 +00:00
Each image gets a version in the build matrix, pushed as a tag next to
sha-<12> and latest, so consumers can pin image:X.Y.Z@sha256:<digest>.
Gitea cannot make a tag immutable, so the prepare step asks the registry
first: when the version tag already exists it is left alone and the job warns
that the version needs bumping. Image versions are independent of the
Collection's release tags, so the v* tag trigger and tag handling go.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
docs(image): update the trigger comment for the removed v* tag trigger
Lint / lint (pull_request) Failing after 1m21s
Build / build (pull_request) Successful in 49s
605bd66ea4
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
Defame1297 merged commit 3c92b3fe32 into main 2026-10-25 11:45:53 +00:00
Defame1297 deleted branch feat/image-semver 2026-10-25 11:45:54 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#7