fix: cache only when build succesfull

This commit is contained in:
2025-12-30 07:24:30 +00:00
parent 3c3cf1e01e
commit 0dcd1b5a97

View File

@@ -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