Reset layer cache experiments

This commit is contained in:
Ingo Oppermann
2024-02-21 21:22:51 +01:00
parent 4bc4b6be1d
commit 819aafda29

View File

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