fix: cache only when build succesfull #59
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
@@ -99,7 +99,7 @@ jobs:
|
||||
type=local,dest=/cache/${{ github.repository }}/buildx-cache-new,mode=max
|
||||
|
||||
- name: Move new cache if it exists
|
||||
if: always()
|
||||
if: steps.build-step.outcome == 'success'
|
||||
run: |
|
||||
mkdir -p /cache/${{ github.repository }}
|
||||
if [ -d /cache/${{ github.repository }}/buildx-cache-new ]; then
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Save Docker layer cache
|
||||
if: always()
|
||||
if: steps.build-step.outcome == 'success'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: /cache/${{ github.repository }}/buildx-cache
|
||||
|
||||
Reference in New Issue
Block a user