Skip to content

Add Docker layer caching to improve build performance#241

Merged
chorrell merged 1 commit intomainfrom
feature/docker-layer-caching
Feb 18, 2026
Merged

Add Docker layer caching to improve build performance#241
chorrell merged 1 commit intomainfrom
feature/docker-layer-caching

Conversation

@chorrell
Copy link
Copy Markdown
Owner

Implements GitHub Actions cache backend for Docker layer caching across both workflows.

Changes:

update-current-image.yml:

  • Added cache-from: type=gha to both 'Build' (test) and 'Build and push Image' (push) steps
  • Added cache-to: type=gha,mode=max to store full layer cache for future reuse

dockerimage.yml:

  • Added cache-from: type=gha to 'Build Image' step
  • Added cache-to: type=gha,mode=max for layer caching

How it works:

  • GitHub Actions caches Docker layers between workflow runs
  • Layers that haven't changed are reused, skipping re-build time
  • Cache is scoped per workflow and branch
  • No external infrastructure or credentials required

Expected Impact:

  • 5-15 minutes faster per build when layers are cached
  • Particularly effective for the second platform build (arm64/amd64) in the same run
  • Significant speedup on subsequent runs of the same Node.js version

Note:

  • mode=max stores all intermediate layers, maximizing cache hit rate
  • Cache will automatically be evicted by GitHub Actions if it exceeds storage limits

Implements GitHub Actions cache backend (type=gha) for Docker layer caching in both workflows:

**update-current-image.yml:**
- Added cache-from: type=gha to both 'Build' and 'Build and push Image' steps
- Added cache-to: type=gha,mode=max to store full cache for reuse

**dockerimage.yml:**
- Added cache-from: type=gha to 'Build Image' step
- Added cache-to: type=gha,mode=max for caching Docker layers

**Benefits:**
- Reuses Docker layers across builds
- Significantly faster builds when layers haven't changed
- No external infrastructure needed (uses GitHub Actions cache)
- Cache is scoped per workflow run context
@chorrell chorrell force-pushed the feature/docker-layer-caching branch from 9aed965 to 4df2cdf Compare February 18, 2026 03:09
@chorrell chorrell merged commit 5a9f198 into main Feb 18, 2026
4 checks passed
@chorrell chorrell deleted the feature/docker-layer-caching branch February 18, 2026 13:53
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