File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,16 +21,21 @@ jobs:
2121 - name : Set up Docker Buildx
2222 uses : docker/setup-buildx-action@v3
2323
24+ - name : Compute cache week
25+ id : cachekey
26+ run : echo "week=$(date -u +%Y-%V)" >> "$GITHUB_OUTPUT"
27+
2428 - name : Cache Docker layers
2529 uses : actions/cache@v4
2630 with :
2731 path : /tmp/.buildx-cache
28- key : docker-buildx-${{ matrix.version }}-${{ github.sha }}
29- restore-keys : docker-buildx-${{ matrix.version }}-
32+ key : docker-buildx-${{ matrix.version }}-${{ steps.cachekey.outputs.week }}-${{ github.sha }}
33+ restore-keys : docker-buildx-${{ matrix.version }}-${{ steps.cachekey.outputs.week }}-
3034
3135 - name : Build
3236 run : |
3337 docker buildx build \
38+ --pull \
3439 --cache-from type=local,src=/tmp/.buildx-cache/${{ matrix.version }} \
3540 --cache-to type=local,dest=/tmp/.buildx-cache/${{ matrix.version }} \
3641 --output type=docker \
You can’t perform that action at this time.
0 commit comments