Skip to content

Commit 347b79e

Browse files
authored
Add buildkit cache dance (#161)
* Add buildkit cache dance Signed-off-by: clux <[email protected]> * ping hooks - 2025-11-27 Signed-off-by: clux <[email protected]> --------- Signed-off-by: clux <[email protected]>
1 parent 4c0b73a commit 347b79e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,21 @@ jobs:
4444
4545
- name: Rust Build Cache for Docker
4646
uses: actions/cache@v4
47+
id: cache
4748
with:
4849
path: rust-build-cache
4950
key: ${{ runner.os }}-build-cache-${{ hashFiles('**/Cargo.toml') }}
5051

51-
- name: inject rust-build-cache into docker
52-
uses: overmindtech/buildkit-cache-dance/inject@main
52+
- name: Inject cache into docker
53+
uses: reproducible-containers/buildkit-cache-dance@v3
5354
with:
54-
cache-source: rust-build-cache
55+
cache-map: |
56+
{
57+
"target": "/volume/target",
58+
"~/.cargo/registry": "/root/.cargo/registry",
59+
"~/.cargo/git": "/root/.cargo/git"
60+
}
61+
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
5562

5663
- name: Docker login
5764
uses: docker/login-action@v3
@@ -74,11 +81,7 @@ jobs:
7481
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') }}
7582
tags: ${{ steps.meta.outputs.tags }}
7683
platforms: ${{ matrix.platform }}
77-
78-
- name: extract rust-build-cache from docker
79-
uses: overmindtech/buildkit-cache-dance/extract@main
80-
with:
81-
cache-source: rust-build-cache
84+
sbom: true
8285

8386
lint:
8487
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)