Update build.yml

This commit is contained in:
Carlos Giraldo
2022-05-25 12:25:43 +02:00
committed by GitHub
parent 64769f8467
commit 9fa22734f2

View File

@@ -54,14 +54,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ steps.image-info.outputs.image }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Build and push
uses: docker/build-push-action@v3
@@ -71,13 +63,5 @@ jobs:
tags: openverso/${{ steps.image-info.outputs.image }}:${{ steps.image-info.outputs.image_tag }}
build-args: version=${{ steps.image-info.outputs.image_tag }}
platforms: ${{ steps.image-info.outputs.platforms }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-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 /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
cache-from: type=gha
cache-to: type=gha,mode=max