Skip to content

Commit 3ad776c

Browse files
committed
fix: use reproducible-containers/buildkit-cache-dance to cache llm-d builds
Signed-off-by: Nick Mitchell <nickm@us.ibm.com>
1 parent a9f3e82 commit 3ad776c

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/llm-d-image-build.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
# for debugging
99
# push:
1010
# branches: [ main ]
11-
# pull_request:
12-
# branches: [ main ]
11+
pull_request:
12+
branches: [ main ]
1313

1414
# cancel any prior runs for this workflow and this PR (or branch)
1515
concurrency:
@@ -67,8 +67,24 @@ jobs:
6767
run: git clone https://github.com/llm-d/llm-d.git -b $LLMD_VERSION
6868

6969
- name: Set up Docker Buildx
70+
id: setup-buildx
7071
uses: docker/setup-buildx-action@v3
7172

73+
- name: Cache
74+
uses: actions/cache@v4
75+
id: cache
76+
with:
77+
path: cache-mount
78+
key: cache-mount-${{ hashFiles('llm-d/docker/Dockerfile.cuda') }}
79+
80+
- name: Restore Docker cache mounts
81+
uses: reproducible-containers/buildkit-cache-dance@v3
82+
with:
83+
builder: ${{ steps.setup-buildx.outputs.name }}
84+
cache-dir: cache-mount
85+
dockerfile: llm-d/docker/Dockerfile.cuda
86+
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
87+
7288
# We only need to log in if we are going to push
7389
- name: Login to Container Registry
7490
uses: docker/login-action@v3

0 commit comments

Comments
 (0)