Repository navigation
ci: build, release and clean up images with the shared org workflows - #381
Conversation
Swap the local _build.yml for Aam-Digital/.github's docker-image.yml and delete pr-<n> images when a PR is closed (pr-image-cleanup.yml). PR images are amd64 only; release images stay amd64 + arm64 and get stable/latest from the release's prerelease flag. Refs Aam-Digital/internal#392 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: 🔵 Low · up to
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Verification of the shared workflows on this PR1. Multi-platform path (temporary commit 40ef59e:
2. Real cleanup (temporary commit d82559d: cleanup job before the build)
3. Final state (temporary jobs reverted):
Leftovers: the test pushes left two superseded
Every push to a PR orphans the previous 🤖 Generated with Claude Code |
…vate preset and lint callers
- Releases: the local semantic-release job is replaced by the shared release.yml
(type: release on every push; it only releases on master). .releaserc.json is unchanged.
- .nvmrc pins the exact Node version 24.21.0; all workflows read it via node-version-file
instead of four hard-coded versions.
- renovate.json extends the shared org presets (default, node, docker).
- New callers of the shared pr-title-lint and actionlint workflows.
- Top-level `permissions: {}` in the caller workflows (checkov CKV2_GHA_1);
each calling job grants what the shared workflow needs.
Part of Aam-Digital/internal#392
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Image check (registry manifests and config labels)
The labels are unchanged. Releases build cleanup-replaced: this push replaced the previous The packages API returns 404 for all three versions now. So the job token can delete versions of this package. Release job on a branch: 🤖 Generated with Claude Code |
The shared release workflow queues its runs in one concurrency group per repository, so a no-op release job of a branch push could replace a master release that waits in that group. Part of Aam-Digital/internal#392 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…prereleases Uses the shared edge-version workflow (Aam-Digital/.github#1): version <last release, patch + 1>-edge.<commits since>, tagged `edge` too while it is the newest commit. Edge images of a finished cycle are pruned after the next full release. The shared release workflow no longer takes `type`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ombined image-cleanup.yml) - image-prune.yml and pr-image-cleanup.yml are now one image-cleanup.yml (`tags` instead of `tag-patterns`; callers grant `actions: write` too). - docker-image.yml builds every platform on a native runner: check names are now `<job> / build (<platform>)` and `<job> / merge`, and the `native-runners` input is gone. - The `org.opencontainers.image.version` label of PR images is set by the shared workflow from the first tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # .github/workflows/on-push.yml
package.json keeps `0.0.0-pr.<n>` (npm only accepts semver); only the label override is dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Aam-Digital/.github#1 is merged and tagged `v1`; its branch is deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of Aam-Digital/internal#392: the CI building blocks move into reusable workflows in the org
.githubrepo, so this repo keeps only what is specific to it.Changes
docker-image.ymlreplaces the local_build.yml.release: published): tags<version>plusstableandlatest, which are set from the release's prerelease flag. Multi-platform (linux/amd64,linux/arm64) as since ci: build multi-platform image (amd64 + arm64) #380.org.opencontainers.image.version=<version>and the description. Each platform is built on a native runner (arm64 onubuntu-24.04-arm, no QEMU).package.json's version is still set to the release version before the build.pr-<n>,linux/amd64only. Its version label is nowpr-<n>(was0.0.0-pr.<n>), like the PR images of the other repos;package.jsonkeeps0.0.0-pr.<n>, because npm only accepts semver. PRs from forks only check that the image builds.image-cleanup.yml(on PR close and after releases) deletes untagged images older than 2 days (feat: shared CI workflows, release automation, Renovate presets and org defaults .github#1).pr-closed.yml): the sharedimage-cleanup.ymldeletespr-<n>when the PR is closed. It first cancels a PR image build that is still running. Until now, nothing deleted PR images in this repo.on-push.yml): everymasterpush, afterLint,TestandE2E Tests, is built asX.Y.Z-edge.N(the last release with the patch number bumped, plus the commits since; sharededge-version.yml), taggededgetoo while it is the newest commit. No git tag, no GitHub release. After each full release,on-release.ymlprunes the edge images of the finished cycle (image-cleanup.ymlwithtags: "*-edge.*").release.yml(type: release, auto mode) replaces the localnpx semantic-releasejob.GH_TOKENPAT, so the release triggers the image build..releaserc.json(plugins,tagFormat) is unchanged; the shared workflow only setsbranchesto the default branch.Lint,TestandE2E Tests, now onmasterpushes only. The shared workflow puts every release run of the repo in one concurrency group, so a no-op release job of a branch push could otherwise replace a master release that is waiting in that group..nvmrcpins the exact version24.22.0(was24). The four hard-codednode-version: 24.22.0in the workflows becomenode-version-file: .nvmrc. NopackageManagerfield: nothing pins npm today. CI and the image use the npm that comes with Node.default,node,docker). It adds thenvmmanager for.nvmrc..nvmrcandFROM node:update together in onenodegroup, and action majors are in thegithub-actionsgroup.pr-title / Validate PR title(sharedpr-title-lint.yml, onpull_request_target) andactionlint / actionlint.permissions: {}in the caller workflows (fixes qlty's checkovCKV2_GHA_1finding). Each calling job grants only what its shared workflow needs.Check names
Lint,Test,E2E Testsbuild / Build and publish replication-backend imagebuild / build (linux/amd64),build / merge(PR); on releases alsobuild / build (linux/arm64)Create ReleaseCreate Release / releaseonmaster;Create Release(skipped) on other branchescleanup-image / cleanup(on close)pr-title / Validate PR title(new, see below)actionlint / actionlint(new)masterhas classic branch protection without required checks, so nothing blocks on the renamed checks. Moving to a ruleset with required checks is a separate step (internal#392).Testing
qlty check(checkov) on the workflows: clean.renovate-config-validator --strict: valid. It cannot resolve the remote presets; the first Renovate run after .github#1 has to confirm them.master,Create Release / releaseran on this branch (b7d4b18). It only loggedReleases are only created from the default branch 'master'and created nothing.cleanup-replacedpart is outdated: that step was replaced by the PR-close sweep.)pr-closed.yml(runs when this PR is closed);pr-title-lint.yml(pull_request_targetruns the base branch's workflow file, so it only shows up on the next PR).🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements