diff --git a/.github/workflows/build_base_matrix_vod.yaml b/.github/workflows/build_base_matrix_vod.yaml index caa40893..a37579cb 100644 --- a/.github/workflows/build_base_matrix_vod.yaml +++ b/.github/workflows/build_base_matrix_vod.yaml @@ -7,6 +7,9 @@ on: branches: - vod +env: + cachedir: /tmp/.buildx-cache-core-vod + jobs: docker: runs-on: [self-hosted] @@ -51,7 +54,7 @@ jobs: - name: Cache Docker layers uses: actions/cache@v4 with: - path: /tmp/.buildx-cache + path: ${{ env.cachedir }} key: ${{ runner.os }}-buildx-${{ github.sha }} restore-keys: | ${{ runner.os }}-buildx- @@ -76,5 +79,12 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new + cache-from: type=local,src=${{ env.cachedir }} + cache-to: type=local,dest=${{ env.cachedir }}-new,mode=max + - # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + name: Move cache + run: | + rm -rf ${{ env.cachedir }} + mv ${{ env.cachedir }}-new ${{ env.cachedir }}