Skip to content

Commit fda2e61

Browse files
committed
Add cache to building hub image in CI
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
1 parent f3168fb commit fda2e61

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,7 @@ jobs:
142142
tags: ${{ steps.meta.outputs.tags }}
143143
labels: ${{ steps.meta.outputs.labels }}
144144
build-args: |
145-
GIT_TAG=${{ github.ref_name }}
146-
GIT_COMMIT=${{ github.sha }}
145+
GIT_TAG=${{ github.event_name == 'pull_request' && 'pr' || github.ref_name }}
146+
GIT_COMMIT=${{ github.event_name == 'pull_request' && 'dev' || github.sha }}
147+
cache-from: type=gha,scope=buildx
148+
cache-to: type=gha,mode=max,scope=buildx

0 commit comments

Comments
 (0)