Skip to content

ci: fix integration Docker build cache (write back to registry)#107

Merged
zeevdr merged 3 commits into
mainfrom
fix/integration-docker-cache
May 28, 2026
Merged

ci: fix integration Docker build cache (write back to registry)#107
zeevdr merged 3 commits into
mainfrom
fix/integration-docker-cache

Conversation

@zeevdr
Copy link
Copy Markdown
Member

@zeevdr zeevdr commented May 28, 2026

Summary

  • The integration job was reading Docker layer cache from ghcr.io but writing it to a local runner path that is discarded when the job ends — so the cache was effectively never warm and every run rebuilt both images from scratch.
  • Switching `cache-to` to `type=registry` (same refs as `cache-from`) closes the write-back loop: the first run seeds the cache, subsequent runs hit it.
  • `packages: write` added to the job permissions so the `GITHUB_TOKEN` can push the cache manifest to ghcr.io.

Test plan

  • Verify the integration job succeeds on this PR (first run seeds the cache)
  • Trigger a second run (re-push or re-run) and confirm "Build tools image" and "Build server image" steps show cache HIT logs from Buildx, reducing build time significantly

zeevdr and others added 2 commits May 28, 2026 21:28
cache-to was writing to a local path discarded after each runner run,
so cache-from=type=registry was always reading an empty or stale cache.
Switch cache-to to type=registry (same refs) so the layer cache
actually persists across runs, and add packages: write permission.

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The decree-typescript GITHUB_TOKEN cannot write to packages owned by
opendecree/decree (403 Forbidden). Switch to type=gha so the cache
is stored in GitHub Actions cache — no cross-repo package permissions
needed, and it's automatically scoped to this repository.

Revert packages: write back to packages: read.

Co-Authored-By: Claude <noreply@anthropic.com>
@zeevdr zeevdr merged commit c10afd7 into main May 28, 2026
12 checks passed
@zeevdr zeevdr deleted the fix/integration-docker-cache branch May 28, 2026 20:00
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