ci(docker): stop exporting PR BuildKit layers to GHA cache to prevent sccache eviction
Merged
GR
8d ago+7+7+0123456789-10-10-01234567890123456789
Based on main (a70ab3ca2). Independent of #1068, #1070, #1074, #1076, and #1077 (touches only .github/workflows/docker.yml).
What
- Cause (observed in Actions cache usage): After #1060 moved
main/release BuildKit layer caches to GHCR,docker.ymlkeptcache-to=type=gha,scope=docker-pr-{variant},mode=maxfor pull requests. A single PR build (#1070, run45215356002, job137835232783) exported 4,259 MB (4.26 GB) ofbuildkit-blobentries (refs/pull/1070/merge) into the 10 GB repo-wide GitHub Actions cache, pushing total repo cache usage to 7.84 GB / 10 GB (alongside ~3.0 GB ofsccacheand 567 MB ofdocker-ccache). Two concurrent Docker PRs immediately exceed 10 GB and trigger LRU eviction ofmain'ssccacheentries (sending hosted PR builds back from ~5–8 min warm to 31–45 min cold / Windows timeout). - Fix (
.github/workflows/docker.yml):- Remove
type=gha,scope=docker-pr-{variant}cache-fromandcache-tolines on pull requests. - Keep read-only
cache-from=type=registry,ref=ghcr.io/luce-org/lucebox-hub:buildcache-{variant}for shared base layers and read-onlydocker-ccacherestore frommain. main,release, andworkflow_dispatchGHCR cache behavior is unchanged.
- Remove
Baseline & measurement (provisional)
- Baseline (
actions/cache/usageon 2026-11-24T07:27Z):- Total repo cache:
7,839 MB / 10,240 MB(10,600active entries) buildkit-blob(refs/pull/1070/merge):4,259 MB(23entries — 54% of total repo cache from 1 PR)docker.ymlPR wait (50 runs, 22 successful): median49m 26s, slowest 5%68m 26s
- Total repo cache:
- After merge: confirm PR
docker.ymlruns write0 Bofbuildkit-blobto GHA cache andci.ymlsccachestays warm without eviction across >= 5 comparable runs.
Coverage & checks
- Every build target (
cuda12,rocm) and verification step indocker.ymlis unchanged. - Validated locally:
yaml.safe_loadon.github/workflows/docker.ymland.github/ci/check_commit_messages.py.