Skip to content

Commit b7229f4

Browse files
koki-developclaude
andcommitted
ci: enable Docker build layer caching with GHA cache backend
Use docker/build-push-action with type=gha cache in CI e2e-test job to avoid rebuilding the entire image on every run. Scope caches per workflow and matrix OS to prevent overwrites between CI and release. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9c6d5cd commit b7229f4

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,17 @@ jobs:
6666
with:
6767
persist-credentials: false
6868
- uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1
69+
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
70+
- name: Build with cache
71+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
72+
with:
73+
context: .
74+
load: true
75+
tags: sandbox:latest
76+
cache-from: type=gha,scope=ci-${{ matrix.os }}
77+
cache-to: type=gha,scope=ci-${{ matrix.os }},mode=max
6978
- name: Start sandbox service
70-
run: docker compose up --build -d
79+
run: docker compose up -d
7180
- name: Wait for service to be ready
7281
run: |
7382
for i in $(seq 1 30); do

.github/workflows/release-please.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ jobs:
7979
platforms: linux/amd64,linux/arm64
8080
tags: ${{ steps.meta.outputs.tags }}
8181
labels: ${{ steps.meta.outputs.labels }}
82-
cache-from: type=gha
83-
cache-to: type=gha,mode=max
82+
cache-from: type=gha,scope=release
83+
cache-to: type=gha,scope=release,mode=max

compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
services:
22
sandbox:
3+
image: sandbox:latest
34
build:
45
context: .
56
dockerfile: Dockerfile

0 commit comments

Comments
 (0)