ci(oci): switch OCI build cache to type=gha (GOV-20) #450
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/GOV-20-lets-chat-gha-build-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Apply the GOV-20 OCI build-cache migration to lets-chat: swap the single image's build cache from a
type=registry:buildcacheimage totype=gha, act_runner's built-in Actions cache server, matching the governance template change.The registry cache round-tripped ~1.7 GiB over the WAN on every build and 499'd the export on slow-upload runners, so layer reuse never actually worked there.
type=ghakeeps the cache local to act_runner (needs the runner'scache.enabled: true).Because a raw
docker buildx build(unlikedocker/build-push-action) does not auto-inject the gha backend's env, andACTIONS_RUNTIME_TOKENis masked fromrun:steps, a new step runscrazy-max/ghaction-github-runtime@v3to re-exportACTIONS_CACHE_URL/ACTIONS_RUNTIME_TOKENintoGITHUB_ENVahead of the build. The repo already uses thedocker-containerbuildx driver, whichtype=gharequires, so no driver change was needed.cache_tokeepsmode=max(preserves the dependency-build layer) andignore-error=true(a cache hiccup or a disabled runner cache will not fail the build).Validation: workflow YAML still parses. The justfile
check/pre-commitsuite compiles and tests the entire Rust workspace in Docker and does not lint or parse.forgejo/workflows/*.yml, so it gives no coverage of this YAML-only change; per the GOV-20 task guidance for workflow-only edits, validation rests on the YAML parse.#GOV-20