Skip to content

Cache Docker build layers with type=gha#86

Merged
paskal merged 1 commit into
masterfrom
fix/docker-gha-cache
Jul 6, 2026
Merged

Cache Docker build layers with type=gha#86
paskal merged 1 commit into
masterfrom
fix/docker-gha-cache

Conversation

@paskal

@paskal paskal commented Jul 6, 2026

Copy link
Copy Markdown
Member

The docker.yml build used no build cache, so every run rebuilt both images from scratch. Add buildx type=gha cache scoped per platform.

The GHCR build (required) populates the cache (cache-to, mode=max); the optional DockerHub build reuses those layers via cache-from, so it becomes a cache hit rather than a second full rebuild — while keeping its continue-on-error best-effort semantics. cache-to carries ignore-error=true so a GitHub cache-service hiccup during cache export can't fail the required publish (cache is only an optimisation).

The docker.yml build had no build cache, so every run rebuilt the image
from scratch. Add buildx type=gha cache scoped per platform so layers
are reused across runs.
@paskal paskal merged commit 255bee7 into master Jul 6, 2026
2 checks passed
@paskal paskal deleted the fix/docker-gha-cache branch July 6, 2026 00:19
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