Skip to content

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

Closed

Description

@dan-petty

Problem

Owner direction of 2026-11-22: version the devtools image with release-please and semantic versions.

  • .github/workflows/image.yml tags each image of main with <date>.<run> (job version, date -u +%Y%m%d and GITHUB_RUN_NUMBER), on each push to main and on the daily rebuild.
  • Such a tag says nothing about the change, and Renovate in the consumers cannot compare it with the older tag form 20261119 (fix(deps): pin the devtools image in its run tag form devops-cli#6760).
  • dan-petty/devops-cli and dan-petty/infra release with release-please and the release App from the environment release (RELEASE_APP_CLIENT_ID, RELEASE_APP_PRIVATE_KEY).

Proposed remedy

  • release-please (googleapis/release-please-action, pinned by digest) with release-please-config.json and .release-please-manifest.json, release type simple (version.txt and CHANGELOG.md). The first release is 1.0.0 (release-as), because consumers use the image now. The workflow takes a token of the release App from the environment release, as dan-petty/infra does, so the release pull request starts the checks.
  • The image workflow publishes on a release tag vX.Y.Z: the manifest list gets the tags X.Y.Z, X.Y, X and latest, and the label org.opencontainers.image.version is X.Y.Z.
  • The daily rebuild builds the newest release tag again and pushes the same 4 tags with the new digest, so the sid packages stay current. A consumer pins tag and digest, and Renovate gives it a digest update.
  • A push to main that is not a release builds and tests the image and publishes no tag.
  • A check of the pull request title (Conventional Commits), because release-please reads the squash commit titles.
  • The <date>.<run> tags stay in the registry, and no new one is made.

Acceptance criteria

  • actionlint passes, and release-please with --dry-run (or the action on a fork branch) proposes 1.0.0 from the commits on main.
  • On the release pull request, the checks run. After its merge, the image of v1.0.0 has the tags 1.0.0, 1.0, 1 and latest, and the version label 1.0.0.
  • A manual run of the daily rebuild pushes the 4 tags of the newest release with a new digest and makes no other tag.
  • A follow-up issue in dan-petty/devops-cli moves its pins from 20261122.53 to 1.0.0 at its digest, because Renovate cannot compare the two forms.

Person steps

  • Add the secret RELEASE_APP_PRIVATE_KEY of the release App to the environment release of this repository. The agent adds the variable RELEASE_APP_CLIENT_ID and the rule that only main deploys, as in dan-petty/devops-cli.

Dependencies

None.

Proposed design

Problem statement

The image workflow tags each main build with <date>.<run>. The tag says nothing about the change, and Renovate cannot compare it with the older 20261119 tag. The change uses release-please with semver releases: a release pull request on main produces vX.Y.Z, and the image workflow publishes X.Y.Z, X.Y, X and latest from that tag. The daily rebuild refreshes those tags, and a push to main that is not a release publishes no tag. A separate follow-up updates the pins in dan-petty/devops-cli.

Acceptance criteria

Requirement: Release Please Configuration

The repository SHALL hold release-please-config.json and .release-please-manifest.json with release type simple, version.txt, CHANGELOG.md, and the first release 1.0.0.

Scenario: Release Please proposes 1.0.0

  • WHEN release-please release-pr --dry-run --repo-url=dan-petty/devtools --config-file release-please-config.json --manifest-file .release-please-manifest.json runs with a GitHub token on main.
  • THEN The command proposes version 1.0.0 and names version.txt and CHANGELOG.md.

Requirement: Release Pull Request Checks

The release-please workflow MUST mint a token for the release App from the environment release and pass it to release-please, so the release pull request starts the repository checks.

Scenario: Release pull request starts checks

  • WHEN release-please opens or updates a release pull request on main.
  • THEN The pull request shows the repository checks in the Checks tab.

Requirement: Release Tag Trigger

The image workflow MUST run when a vX.Y.Z tag is pushed.

Scenario: Release tag starts the image workflow

  • WHEN release-please pushes the tag v1.0.0.
  • THEN The image workflow run for v1.0.0 shows the test, push, verify and publish jobs.

Requirement: Release Tag Tags

The image workflow MUST publish a release vX.Y.Z with the tags X.Y.Z, X.Y, X and latest.

Scenario: Release v1.0.0 publishes four tags

  • WHEN The release v1.0.0 is created and its image workflow completes.
  • THEN docker buildx imagetools inspect on the tags 1.0.0, 1.0, 1 and latest of the image repository shows one manifest list digest.

Requirement: Version Label

Each published image MUST set the label org.opencontainers.image.version to X.Y.Z.

Scenario: Version label is 1.0.0

  • WHEN docker pull ghcr.io/dan-petty/devtools:1.0.0 and docker inspect --format '{{ index .Config.Labels "org.opencontainers.image.version" }}' ghcr.io/dan-petty/devtools:1.0.0 run.
  • THEN The command prints 1.0.0.

Requirement: Daily Rebuild

The daily rebuild MUST build the newest release tag and push the four release tags with the new digest.

Scenario: Manual rebuild moves the tags

  • WHEN A manual workflow_dispatch run of the image workflow completes.
  • THEN The four tags of the newest release resolve to a new digest and no new <date>.<run> tag appears.

Requirement: Main Push No Publish

A push to main that is not a release MUST build and test the image and MUST NOT publish a tag.

Scenario: Main push publishes no tag

  • WHEN A push to main completes and the run is not a release.
  • THEN The image workflow shows the test jobs passed, the publish job did not run, and the registry has no new tag from that run.

Requirement: Pull Request Title

The repository MUST check each pull request title against Conventional Commits.

Scenario: Bad title fails

  • WHEN A pull request with the title Add tool opens.
  • THEN The amannn/action-semantic-pull-request check fails and reports that the title must follow Conventional Commits.

Requirement: Actionlint

The workflows MUST pass actionlint.

Scenario: Actionlint passes

  • WHEN docker run --rm -v "$PWD:/src:ro" -w /src devtools:test actionlint runs.
  • THEN The command exits 0.

Existing Tool Considered

release-please (googleapis/release-please-action) is the open, maintained tool for Conventional Commit release pull requests and semver tags, and the owner direction of 2026-11-22 names it. It lacks a container image tag publisher and an App token minter: docker/metadata-action maps vX.Y.Z to X.Y.Z, X.Y, X and latest, docker/build-push-action publishes the manifest list, and actions/create-github-app-token mints the release App token. amannn/action-semantic-pull-request covers the pull request title check. No alternatives check has run.

Key questions

  • Which tag does the image workflow make on main now?: It makes <date>.<run> from date -u +%Y%m%d and GITHUB_RUN_NUMBER. The publish job refuses to move a tag that already exists. [sources: .github/workflows/image.yml:194, .github/workflows/image.yml:421]
  • Which tool creates the release pull request and the semver tag?: Use googleapis/release-please-action pinned by digest with release-please-config.json and .release-please-manifest.json, release type simple, and release-as: 1.0.0. The owner direction of 2026-11-22 names release-please and semver, and the repository keeps each version in the standard file of its source. (best practice) [sources: README.md:47, .github/labels.yml:3]
    • Chosen: release-please. It opens a release pull request from Conventional Commit titles and writes the version and changelog, as the owner direction names.
    • Rejected: semantic-release. It publishes from CI without a release pull request, so the release checks do not run before the tag.
    • Rejected: custom script. It adds code to keep and test for version calculation and changelog output.
  • How does the release pull request start the repository checks?: Mint a token for the release App in the release environment with actions/create-github-app-token from vars.RELEASE_APP_CLIENT_ID and secrets.RELEASE_APP_PRIVATE_KEY, and pass it to release-please. A token from a GitHub App starts a new workflow run; an event that GITHUB_TOKEN creates does not. (proposed)
    • Chosen: release App token. A token from a GitHub App starts a new workflow run on the release pull request.
    • Rejected: GITHUB_TOKEN. Events that GITHUB_TOKEN creates do not start a new workflow run.
    • Rejected: personal access token. It is a long-lived secret and needs manual rotation.
  • What is the first release version?: Set release-as to 1.0.0 in release-please-config.json, because consumers use the image now. (best practice) [sources: README.md:6, README.md:16]
    • Chosen: 1.0.0. Consumers use the image now, so the first semver release is stable.
    • Rejected: 0.1.0. It says the image is pre-release, but consumers use it now.
  • Which tags does the image publish from a release?: Publish X.Y.Z, X.Y, X and latest from the release tag vX.Y.Z. (best practice) [sources: README.md:16, .github/workflows/image.yml:481]
    • Chosen: four tags. Consumers can pin the exact version, the minor line or the major line, and latest follows the newest release.
    • Rejected: only X.Y.Z and latest. Consumers cannot pin a major or minor line.
    • Rejected: only latest. Consumers cannot pin a version.
  • Does the daily rebuild move the release tags?: Yes. The daily rebuild builds the newest release tag and moves the four tags to the new digest. Consumers pin tag and digest, and Renovate gives a digest update. When a newer release exists, the older release lines stop moving. (best practice) [sources: SECURITY.md:15, README.md:16]
    • Chosen: move the release tags. The sid packages stay current without a new release each day.
    • Rejected: make a new patch release each day. It needs a new release pull request and tag each day.
    • Rejected: keep the release tags immutable. The sid packages in the image go stale.
  • Which tool checks the pull request title?: Use amannn/action-semantic-pull-request pinned by digest in a pull_request workflow. (best practice) [sources: .github/labels.yml:3]
    • Chosen: amannn/action-semantic-pull-request. It checks pull request titles against Conventional Commits and is maintained.
    • Rejected: custom shell script. It adds code to keep for a check that a maintained action covers.
  • Where does release-please run?: In a new .github/workflows/release.yml on a push to main. The image workflow stays focused on the image. (best practice) [sources: .github/workflows/clear-status.yml, .github/workflows/image.yml]
    • Chosen: new release workflow. It separates the release pull request from the image build and keeps each workflow small.
    • Rejected: add release-please to image.yml. It mixes release management with the image build and test jobs.
  • Who adds the release App secret?: A repository admin adds the environment release, the variable RELEASE_APP_CLIENT_ID, the secret RELEASE_APP_PRIVATE_KEY, and the deployment rule that only main deploys. The agent cannot add these repository settings. (a person decides)
  • Does this change update the consumer pins in dan-petty/devops-cli?: No. The consumer pin update is a separate follow-up in dan-petty/devops-cli, because it changes another repository and waits on the 1.0.0 release here. The follow-up moves the pins from 20261122.53 to 1.0.0 at its digest. (best practice) [sources: README.md:16]
    • Chosen: separate follow-up. The change is in another repository and does not block the release here.
    • Rejected: include in this pull request. It changes another repository and cannot merge with this pull request.

Open questions

  • Who adds the release App secret? (a person decides)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. dan-petty commented on Nov 22, 2026

    @dan-petty
    OwnerAuthor
    • Scope: none. The title has the scope release, and .github/labels.yml declares no scope/release label. Add the label to the file to give the scope to this item.
    • Related: fix(ci): give each publish a tag that never moves #17, which asks for a different change. Both deal with image tag identity, but #17 made the date tag immutable while the candidate replaces the date scheme with semver via release-please.
  2. added
    type/infra
    status/new
    value/medium
    effort/medium
    source/agent
    priority/p2-medium
    on Nov 22, 2026
  3. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  4. added
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 22, 2026
  5. added a commit that references this issue on Nov 22, 2026
    f027db6
  6. added
    status/in-review
    and removed
    status/in-progress
    on Nov 22, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 22, 2026
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

    effort/mediumpriority/p2-mediumsource/agenttype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions