From a96c09997e94c2e9adc413841ad74bbfec506ae4 Mon Sep 17 00:00:00 2001 From: Tomer Figenblat Date: Tue, 6 Feb 2024 23:44:19 -0500 Subject: [PATCH] ci: used experimental gha cache type from building images Signed-off-by: Tomer Figenblat --- .github/workflows/pr.yml | 10 ++-------- .github/workflows/release.yml | 10 ++-------- .github/workflows/stage.yml | 10 ++-------- 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2064eca..04edc4a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -56,18 +56,12 @@ jobs: - name: Setup docker buildx uses: docker/setup-buildx-action@v3 - - name: Cache image layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-image-layers-${{ hashFiles('Dockerfile') }} - - name: Build image uses: docker/build-push-action@v5 with: tags: ${{ env.TESTING_TAG }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache + cache-from: type=gha + cache-to: type=gha,mode=max load: true - name: Test image run diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb1930d..1c110d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,12 +39,6 @@ jobs: - name: Setup docker buildx uses: docker/setup-buildx-action@v3 - - name: Cache image layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-image-layers-${{ hashFiles('Dockerfile') }} - - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -115,6 +109,6 @@ jobs: tags: | tomerfi/version-bumper:latest tomerfi/version-bumper:${{ steps.bump.outputs.version }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache + cache-from: type=gha + cache-to: type=gha,mode=max labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index b794a94..51f3ef0 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -53,17 +53,11 @@ jobs: - name: Setup docker buildx uses: docker/setup-buildx-action@v3 - - name: Cache image layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-image-layers-${{ hashFiles('Dockerfile') }} - - name: Build image uses: docker/build-push-action@v5 with: tags: tomerfi/version-bumper:staging - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache + cache-from: type=gha + cache-to: type=gha,mode=max load: true