Skip to content

feat(ci): version the image with release-please and semver - #38

Merged
dan-petty merged 1 commit into
mainfrom
build/37-release-please-semver
Nov 22, 2026
Merged

dan-petty merged 1 commit into
mainfrom
build/37-release-please-semver

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

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 dan-petty added type/feature Type feature: a new function scope/ci GitHub Actions workflows: build, scan, push and publish labels Nov 22, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Person step and owner review points for this pull request.

Person step

  • Add the secret RELEASE_APP_PRIVATE_KEY of the release App to the environment release of this repository. The variable RELEASE_APP_CLIENT_ID and the branch rule exist. Until the secret exists, release.yml stops at its first step on each push to main and names the missing secret, and no release comes.

Owner review points

  1. The first release uses initial-version: "1.0.0", not release-as. release-please 17.6.0 (the version that the pinned action bundles) uses initial-version only while no release exists, with the manifest at 0.0.0. release-as holds every later release at 1.0.0 until a change removes it. An offline dry run of release-please 17.6.0 on the commits of this branch proposes chore(main): release 1.0.0. With a release v1.0.0, a fix(deps) commit gives 1.0.1.
  2. The issue does not name the Renovate rule in .github/renovate.json. The shared preset writes chore(deps):, and release-please opens no release pull request for chore only (the same dry run shows this). Without the rule, an update of a tool would never get to a release. The rule writes fix(deps): for updates of Dockerfile, mise.toml, npm/ and python/. An update of a GitHub action or of a test image keeps chore(deps):.
  3. The squash merge setting of this repository is "commit or pull request title". A pull request with one commit gets the subject of the commit, and pr-title.yml does not check that subject. The repository setting "pull request title" closes this gap. This is a repository setting, so a person decides.
  4. Semantic PR title is not a required check. If you want it required, add it to the ruleset of main.
  5. A person with write access can push a tag vX.Y.Z with no GitHub release. The publish job then stops at its newest-release check and moves no tag, but the push job has already pushed untagged digests. A tag ruleset that lets only the release App create v* tags stops this. This is a repository setting, so a person decides.
  6. From the merge of this pull request to the first release, the daily rebuild tests main and publishes nothing. latest stays on the newest <date>.<run> image until 1.0.0 is published.

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
dan-petty force-pushed the build/37-release-please-semver branch from ed76fb8 to f027db6 Compare November 22, 2026 14:25
@dan-petty
dan-petty marked this pull request as ready for review November 22, 2026 14:47
@dan-petty
dan-petty merged commit e1defdd into main Nov 22, 2026
10 of 11 checks passed
@dan-petty
dan-petty deleted the build/37-release-please-semver branch November 22, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ci GitHub Actions workflows: build, scan, push and publish type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build(release): version the image with release-please and semver

1 participant