Skip to content

Commit 792497c

Browse files
committed
upload apt and uv cache
1 parent d58826f commit 792497c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/docker-publish.yml

+21
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,27 @@ jobs:
9393
type=raw,enable=${{ github.ref_type == 'tag' }}, value=latest
9494
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
9595

96+
- name: Set up apt cache
97+
uses: actions/cache@v4
98+
id: cache
99+
with:
100+
path: |
101+
var-cache-apt
102+
var-lib-apt
103+
/root/.cache/uv
104+
key: cache-${{ hashFiles('Dockerfile') }}
105+
106+
- name: Inject cache into docker
107+
uses: reproducible-containers/buildkit-cache-dance@v3.1.0
108+
with:
109+
cache-map: |
110+
{
111+
"var-cache-apt": "/var/cache/apt",
112+
"var-lib-apt": "/var/lib/apt"
113+
"root-cache-uv": "/root/.cache/uv"
114+
}
115+
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
116+
96117
# Build and export Docker image for each platform (without pushing)
97118
- name: Build Docker image
98119
id: build

0 commit comments

Comments
 (0)