Skip to content

fix(ci): switch from GHA cache to registry cache#12

Merged
MaxAnderson95 merged 1 commit into
mainfrom
fix/use-registry-cache
Jan 17, 2026
Merged

fix(ci): switch from GHA cache to registry cache#12
MaxAnderson95 merged 1 commit into
mainfrom
fix/use-registry-cache

Conversation

@MaxAnderson95

Copy link
Copy Markdown
Owner

Summary

Switch from GitHub Actions cache to registry cache to fix build caching.

Root Cause

The previous caching attempts failed because:

  • 10 GB GHA cache limit exceeded with 14 parallel builds (7 services × 2 platforms)
  • Cache eviction thrashing: new cache entries evicted old ones before they could be used
  • The power-service-amd64 cache index was being evicted almost immediately after creation

Solution

Use registry cache instead of GHA cache:

  • Stores build cache as tags in ghcr.io (e.g., image:cache-amd64)
  • No practical size limit (uses container registry storage)
  • Each service gets its own cache tag that persists indefinitely

Changes

# Before (GHA cache - 10GB limit shared across all builds)
cache-from: type=gha,scope=power-service-amd64
cache-to: type=gha,mode=max,scope=power-service-amd64

# After (Registry cache - unlimited, stored in ghcr.io)
cache-from: type=registry,ref=ghcr.io/.../power-service:cache-amd64
cache-to: type=registry,ref=ghcr.io/.../power-service:cache-amd64,mode=max

The 10GB GitHub Actions cache limit was exceeded with 14 parallel
builds (7 services × 2 platforms), causing cache eviction thrashing
where new cache entries would evict old ones before they could be used.

Switch to registry cache which stores the build cache as tags in
ghcr.io (e.g., image:cache-amd64). This has no practical size limit
and avoids the eviction problem entirely.
@MaxAnderson95 MaxAnderson95 merged commit de4a2d7 into main Jan 17, 2026
@MaxAnderson95 MaxAnderson95 deleted the fix/use-registry-cache branch January 17, 2026 17:02
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