Skip to content

ci(docker): cache BuildKit layers in a registry the runner advertises - #31

Merged
hbrombeer merged 1 commit into
mainfrom
ci/buildkit-registry-cache
Sep 29, 2026
Merged

hbrombeer merged 1 commit into
mainfrom
ci/buildkit-registry-cache

Conversation

@hbrombeer

Copy link
Copy Markdown
Member

New step Resolve layer cache (id: layer_cache) before setup-buildx-action:

Runner cache-from / cache-to buildkitd config
GitHub-hosted type=gha,scope=<repo>-amd64 (unchanged) –
self-hosted + BUILDKIT_CACHE_REGISTRY type=registry,ref=<registry>/cache/<repo>:amd64, export mode=max,ignore-error=true [registry."<registry>"] http = true, insecure = true
anything else none (as since #29) –

The hbr1 runners advertise the registry via runner env, the same way as GRADLE_BUILD_CACHE_URL. The registry itself (build-cache-registry in arc-runners, 200 Gi local-path, weekly GC) and the runner env are rolled out separately on hbr1. Until then the workflow behaves exactly as it does today.

Tests: the build steps must reference the resolver's outputs, and three new tests run the resolver script with bash (hosted / self-hosted with registry / without registry); the generated TOML parses. 7/7 green.

Resolve the layer cache on the runner: GitHub-hosted keeps the GHA
cache; a self-hosted runner that sets BUILDKIT_CACHE_REGISTRY gets a
registry cache (cache/<repo>:amd64, exported with ignore-error) and a
buildkitd config marking that registry plain HTTP; anything else builds
without a layer cache, as since the previous change.
@hbrombeer
hbrombeer merged commit 9b92c61 into main Sep 29, 2026
3 checks passed
@hbrombeer
hbrombeer deleted the ci/buildkit-registry-cache branch September 29, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant