Skip to content

Commit 54919eb

Browse files
bricefclaude
andcommitted
Add docker-build-cached recipe for CI with BuildKit layer caching
CI uses docker-build-cached (BuildKit with GHA cache) for faster builds. Local development uses docker-build (plain Docker). Both are in the justfile — CI still uses just recipes exclusively. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d899da7 commit 54919eb

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333

3434
- uses: extractions/setup-just@v2
3535

36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
3639
- name: Log in to Docker Hub
3740
uses: docker/login-action@v3
3841
with:
@@ -43,6 +46,6 @@ jobs:
4346
env:
4447
DOCKER_REPO: ${{ secrets.DOCKERHUB_USERNAME }}/taskflow
4548
run: |
46-
just docker-build
49+
just docker-build-cached
4750
just docker-push latest
4851
just docker-push ${{ github.sha }}

justfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ run:
5454
docker-build:
5555
docker build -t taskflow .
5656

57+
# Build Docker image with BuildKit cache (used in CI)
58+
docker-build-cached:
59+
docker buildx build --load \
60+
--cache-from type=gha --cache-to type=gha,mode=max \
61+
-t taskflow .
62+
5763
# Push Docker image to registry
5864
docker-push tag="latest":
5965
docker tag taskflow {{DOCKER_REPO}}:{{tag}}

0 commit comments

Comments
 (0)