diff --git a/.github/workflows/build_base_vod.yaml b/.github/workflows/build_base_vod.yaml index 87e9b024..66236eda 100644 --- a/.github/workflows/build_base_vod.yaml +++ b/.github/workflows/build_base_vod.yaml @@ -7,9 +7,6 @@ on: branches: - vod -env: - cachedir: /tmp/.buildx-cache-core-vod - jobs: docker: runs-on: [self-hosted] @@ -56,8 +53,10 @@ jobs: - name: Cache Docker layers uses: actions/cache@v4 with: - path: ${{ env.cachedir }}-${{ matrix.key }} - key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ matrix.key }} + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - name: Login to DockerHub if: github.event_name != 'pull_request' @@ -79,12 +78,5 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=${{ env.cachedir }}-${{ matrix.key }} - cache-to: type=local,dest=${{ env.cachedir }}-${{ matrix.key }}-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 }}-${{ matrix.key }} - mv ${{ env.cachedir }}-${{ matrix.key }}-new ${{ env.cachedir }}-${{ matrix.key }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new