Repository navigation
feat(ci): version the image with release-please and semver - #38
Merged
Merged
Conversation
Owner
Author
|
Person step and owner review points for this pull request. Person step
Owner review points
|
The image gets semantic versions from release-please. Before this change, each push to `main` and each daily rebuild published a tag `<date>.<run>`. Such a tag tells nothing about the change, and Renovate in a consumer cannot compare it with the older tag form `20261119`. Releases: - `release.yml` runs release-please (`googleapis/release-please-action`, pinned by digest) on each push to `main`, with the release type `simple` (`version.txt`, `CHANGELOG.md`). The first release is `1.0.0` (`initial-version`), because consumers use the image now. `initial-version` applies only while no release exists, so no later change must remove it. - The workflow takes a token of the release App from the environment `release`, as dan-petty/infra does. A pull request or a tag that `GITHUB_TOKEN` creates starts no workflow, and the ruleset of `main` requires the checks of `image.yml`. The first step names a missing credential. - `pr-title.yml` checks that each pull request title is a Conventional Commit (`amannn/action-semantic-pull-request`, pinned by digest), because release-please reads the commit titles. The scopes are those of the `scope/*` labels, and `main` for the release pull request. The squash commit of a pull request with one commit takes the subject of the commit, not the title, so for such a pull request the check also checks the subject of the commit (`validateSingleCommit`). - Renovate writes `fix(deps):` for an update of a tool or of a base image of the image, because release-please makes no release for the type `chore`. An update of a GitHub action or of a test image keeps `chore(deps):`. - `.github/labels.yml` declares the labels `autorelease: pending` and `autorelease: tagged` of release-please. Image workflow: - A release tag `vX.Y.Z` publishes the manifest list with the tags `X.Y.Z`, `X.Y`, `X` and `latest`. The label and the annotation `org.opencontainers.image.version` are `X.Y.Z`, and `org.opencontainers.image.revision` is the commit of the release. - The daily rebuild and a manual run on `main` build the commit of the newest release again with `--pull --no-cache`, and move the same 4 tags to the new digest. So the sid packages stay current, and a consumer that pins tag and digest gets a digest update from Renovate. - A pull request, a push to `main` and a manual run on a different branch build and test the image, and publish nothing. - The publish job stops and moves no tag when its release is not the newest release, for example when a release comes during a daily rebuild. - The release path and the daily path keep each test, lint, scan and attestation step. - No new image gets a tag `<date>.<run>`. The old tags stay in the registry. README.md and SECURITY.md tell the tags, the versions, how a consumer pins tag and digest, and the release flow. Closes #37
dan-petty
force-pushed
the
build/37-release-please-semver
branch
from
November 22, 2026 14:25
ed76fb8 to
f027db6
Compare
2 tasks
dan-petty
marked this pull request as ready for review
November 22, 2026 14:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The image gets semantic versions from release-please. Before this change, each push to
mainand each daily rebuild published a tag<date>.<run>. Such a tag tells nothing about the change, and Renovate in a consumer cannot compare it with the older tag form20261119.Releases:
release.ymlruns release-please (googleapis/release-please-action, pinned by digest) on each push tomain, with the release typesimple(version.txt,CHANGELOG.md). The first release is1.0.0(initial-version), because consumers use the image now.initial-versionapplies only while no release exists, so no later change must remove it.release, as dan-petty/infra does. A pull request or a tag thatGITHUB_TOKENcreates starts no workflow, and the ruleset ofmainrequires the checks ofimage.yml. The first step names a missing credential.pr-title.ymlchecks that each pull request title is a Conventional Commit (amannn/action-semantic-pull-request, pinned by digest), because release-please reads the commit titles. The scopes are those of thescope/*labels, andmainfor the release pull request. The squash commit of a pull request with one commit takes the subject of the commit, not the title, so for such a pull request the check also checks the subject of the commit (validateSingleCommit).fix(deps):for an update of a tool or of a base image of the image, because release-please makes no release for the typechore. An update of a GitHub action or of a test image keepschore(deps):..github/labels.ymldeclares the labelsautorelease: pendingandautorelease: taggedof release-please.Image workflow:
vX.Y.Zpublishes the manifest list with the tagsX.Y.Z,X.Y,Xandlatest. The label and the annotationorg.opencontainers.image.versionareX.Y.Z, andorg.opencontainers.image.revisionis the commit of the release.mainbuild the commit of the newest release again with--pull --no-cache, and move the same 4 tags to the new digest. So the sid packages stay current, and a consumer that pins tag and digest gets a digest update from Renovate.mainand a manual run on a different branch build and test the image, and publish nothing.<date>.<run>. The old tags stay in the registry.README.md and SECURITY.md tell the tags, the versions, how a consumer pins tag and digest, and the release flow.
Closes #37