Skip to content

Commit 25f769d

Browse files
committed
Add cache to the test step
1 parent 865df56 commit 25f769d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/ci-pipeline.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,42 @@ jobs:
3333
- name: Setup Docker buildx
3434
uses: docker/[email protected]
3535

36+
- name: UV Build Caches for Docker
37+
id: docker-build-uv-cache
38+
uses: actions/cache@v4
39+
with:
40+
path: |
41+
home-nonroot-cache-uv
42+
key: cache-uv-${{ hashFiles('uv.lock') }}
43+
44+
- name: APT Build Caches for Docker APT
45+
id: docker-build-apt-cache
46+
uses: actions/cache@v4
47+
with:
48+
path: |
49+
var-cache-apt
50+
var-lib-apt
51+
key: cache-apt-${{ hashFiles('Dockerfile') }}
52+
53+
- name: Inject UV cache in docker
54+
uses: reproducible-containers/[email protected]
55+
with:
56+
cache-map: |
57+
{
58+
"home-nonroot-cache-uv": "/home/nonroot/.cache/uv"
59+
}
60+
skip-extraction: ${{ steps.docker-build-uv-cache.outputs.cache-hit }}
61+
62+
- name: Inject APT cache in docker
63+
uses: reproducible-containers/[email protected]
64+
with:
65+
cache-map: |
66+
{
67+
"var-cache-apt": "/var/cache/apt",
68+
"var-lib-apt": "/var/lib/apt",
69+
}
70+
skip-extraction: ${{ steps.docker-build-apt-cache.outputs.cache-hit }}
71+
3672
# Build but don't push Docker image with Buildx
3773
# https://github.com/docker/build-push-action
3874
- name: Build test image

0 commit comments

Comments
 (0)