Skip to content

Commit 9409d2a

Browse files
Merge pull request #7 from brianhlin/improve-caching
Improve cache hit rate but ensure we pull the latest software-base
2 parents 5f08e0a + 1448f2c commit 9409d2a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/build-container.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ jobs:
3636
with:
3737
path: /tmp/.buildx-cache
3838
key: base-${{ matrix.repo }}-buildx-${{ github.sha }}
39+
# allow cache hits from previous runs of the current branch,
40+
# parent branch, then upstream branches, in that order
41+
restore-keys: |
42+
base-${{ matrix.repo }}-buildx-
3943
4044
- name: Set up Docker Buildx
4145
uses: docker/setup-buildx-action@v1
@@ -44,6 +48,7 @@ jobs:
4448
uses: docker/[email protected]
4549
with:
4650
build-args: BASE_YUM_REPO=${{ matrix.repo }}
51+
pull: True
4752
target: base
4853
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
4954

0 commit comments

Comments
 (0)