ci(oci): switch OCI build cache to type=gha + per-image scope (GOV-20, GOV-21) #240

Merged
David merged 2 commits from ci/GOV-20-bunyip-gha-build-cache into main 2026-06-26 10:58:28 +02:00
Owner

Switches both image build workflows (build-api.yml, build-web.yml) from the type=registry :buildcache cache to act_runner's built-in type=gha Actions cache server, per GOV-20. A raw docker buildx build does not auto-inject the gha backend env and ACTIONS_RUNTIME_TOKEN is masked from run: steps, so a new step uses crazy-max/ghaction-github-runtime@v3 to re-export ACTIONS_CACHE_URL / ACTIONS_RUNTIME_TOKEN into GITHUB_ENV (needs the runner's cache.enabled: true).

Because type=gha caches per repo and bunyip builds two images, each build sets scope=($image) (bunyip-api, bunyip-web) so the images get isolated cache namespaces instead of overwriting each other's layers, per GOV-21. mode=max keeps the dependency-build layer and ignore-error keeps a cache hiccup or disabled runner cache from failing the build.

Validation: both YAML files parse; just pre-commit passed (build + clippy + fmt + tests green).

#GOV-20
#GOV-21

Switches both image build workflows (build-api.yml, build-web.yml) from the type=registry `:buildcache` cache to act_runner's built-in type=gha Actions cache server, per GOV-20. A raw `docker buildx build` does not auto-inject the gha backend env and ACTIONS_RUNTIME_TOKEN is masked from run: steps, so a new step uses crazy-max/ghaction-github-runtime@v3 to re-export ACTIONS_CACHE_URL / ACTIONS_RUNTIME_TOKEN into GITHUB_ENV (needs the runner's cache.enabled: true). Because type=gha caches per repo and bunyip builds two images, each build sets scope=($image) (bunyip-api, bunyip-web) so the images get isolated cache namespaces instead of overwriting each other's layers, per GOV-21. mode=max keeps the dependency-build layer and ignore-error keeps a cache hiccup or disabled runner cache from failing the build. Validation: both YAML files parse; `just pre-commit` passed (build + clippy + fmt + tests green). #GOV-20 #GOV-21
ci(oci): switch build cache to gha with per-image scope
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 1m8s
Check / fmt + clippy + build + tests (pull_request) Successful in 26m54s
4145c352bd
Swap both image workflows from a type=registry :buildcache cache to act_runner's built-in type=gha Actions cache server, and export the Actions runtime env (ACTIONS_CACHE_URL / ACTIONS_RUNTIME_TOKEN) via crazy-max/ghaction-github-runtime so a raw docker buildx build can reach it; because type=gha is scoped per repo and this repo builds two images (bunyip-api, bunyip-web), each build sets scope=($image) so the images get isolated cache namespaces instead of overwriting each other's layers.

#GOV-20
#GOV-21
Merge branch 'main' into ci/GOV-20-bunyip-gha-build-cache
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 22s
Check / fmt + clippy + build + tests (pull_request) Successful in 11m19s
Create release / Create release from merged PR (pull_request) Has been skipped
b1bb4c9d34
David merged commit 32651ac1dd into main 2026-06-26 10:58:28 +02:00
David deleted branch ci/GOV-20-bunyip-gha-build-cache 2026-06-26 10:58:28 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!240
No description provided.