Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 4.43 KB

releases.md

File metadata and controls

19 lines (12 loc) · 4.43 KB

Releases

Releases

Every push to main runs .github/workflows/release.yml, driven by semantic-release (.releaserc.json) against Conventional Commits (commitlint.config.js, enforced by the commitlint CI job above, which checks every commit and the pull request title). Almost every conventional-commit type triggers at least a patch release (see .releaserc.json's commit-analyzer releaseRules: feat is minor, a breaking change (! or a BREAKING CHANGE: footer) is major, everything else conventional is patch), so in practice nearly every push to main produces a release.

A release:

  1. Stamps the new version into galaxy.yml's version: field (which stays 0.0.0 in source between releases) and into the published-image tag defaults in roles/github_runner_arc/defaults/main.yml (github_runner_arc_heartbeat_image, github_runner_arc_autoscaler_image, github_runner_arc_image_pull_secret_renewer_image, github_runner_arc_node_recovery_image), and into each role's *_collection_version default, which the deployed-state stamps record - scripts/release/stamp_version.py does this by matching each variable's own name, not a line number, so it stays correct even while those files are edited concurrently by unrelated work.
  2. Builds the collection tarball (ansible-galaxy collection build --force) and attaches it to the GitHub Release.
  3. Updates CHANGELOG.md and commits it, galaxy.yml, and the stamped defaults file back to main as chore(release): <version> [skip ci].
  4. Builds and pushes every container image (Dockerfile, heartbeat/Dockerfile, autoscaler/Dockerfile, pull-secret-renewer/Dockerfile, node-recovery/Dockerfile, fleet-role/Dockerfile) multi-arch (linux/arm64,linux/amd64) to their ghcr.io/exadev/github-runner* repositories, each tagged with the exact version, the floating major version, and latest - all three tags on the same manifest, via docker/metadata-action's type=semver patterns. To pin a host to a specific release rather than floating on latest, set roles/github_runner_arc/defaults/main.yml's image variables (or a host's own override) to an exact version tag instead.
  5. Optionally publishes the collection to Ansible Galaxy, only if a GALAXY_API_KEY secret is present - the [skip ci] release commit and the image build both happen unconditionally, in this same run, regardless of whether Galaxy publishing is configured.

The [skip ci] in the release commit message is deliberate: the image build already happens in this same run using the exact version semantic-release just decided, so there is nothing useful for a second, separately-triggered run of this workflow (or of ci.yml) to do against a commit that only changed a version stamp and a changelog - ci.yml's own lint jobs already ran against every commit before it reached main.

The reference capability images in tool-images/ are not part of a release. .github/workflows/publish-tool-images.yml builds each one natively on amd64 and arm64 runners and pushes it to ghcr.io/<owner>/github-runner-toolcache-<name>, ghcr.io/<owner>/github-runner-sysroot-<name> or ghcr.io/<owner>/github-runner-runner-build, tagged with the version its Dockerfile pins (followed by -r<revision> where it declares an IMAGE_REVISION), when started by hand (gh workflow run publish-tool-images.yml) or by pushing a tool-images-<anything> tag. It leaves a version tag that already exists alone, and its run summary gives each pushed image's <image>:<version>@sha256:<digest> reference to pin in a capability or as a runner image. A new GitHub Container Registry package starts private; make it public in its package settings so pods can pull it without a credential. A build runner entry with a runner_id publishes the same image with its runner user at that uid and gid, tagged <runner version>-uid<id> (the ARC role README says when a fleet needs one).

What the release push needs: a deploy key with write access on ExaDev/github-runner, whose private key is the RELEASE_DEPLOY_KEY repository secret release.yml checks out with. If main gains a ruleset, add deploy keys as its bypass actor so the release commit can land. Publishing to Ansible Galaxy additionally needs a GALAXY_API_KEY repository secret (an API key from https://galaxy.ansible.com/me/preferences); without it, the publish step logs that it's skipping and the release still completes.