Commit b30e901
authored
ci: switch Docker GHA cache to mode=min to reduce cache bloat (#1152)
## Problem
The main branch Docker build workflow was using `cache-to:
type=gha,mode=max`, which saves all intermediate build layers (50+
stages). Combined with recent workflow changes, this caused the repo GHA
cache to balloon to ~10 GB, hitting GitHub's per-repo limit and
triggering eviction of the `essentialcsharpweb-main` scope layers.
Result: subsequent builds saw 0% cache hit despite warm cache.
## Solution
Switch to `cache-to: type=gha,mode=min` on the main branch deploy
workflow.
- `mode=min` saves only the final exported layers (base image +
published app binaries)
- `cache-from` still reads everything available, so builds benefit from
layer reuse on unchanged stages
- Expected cache footprint reduction: ~60% (6.7 GB → ~2.5 GB)
- No impact on cache hit rates for stable/slow-changing layers
## Changes
- `.github/workflows/Build-Test-And-Deploy.yml`: line 95, change
`mode=max` to `mode=min`
This is a safe, read-path-agnostic change — pulling behavior is
unaffected, only what gets written changes.1 parent a62a63b commit b30e901
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
0 commit comments