Merge pull request 'fix: cache only when build succesfull' (#59) from fix-build-cache into main

Reviewed-on: #59
Reviewed-by: nikitos <andriyanov@me.com>
This commit is contained in:
2025-12-30 14:30:27 +00:00

View File

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