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