Revert to old cache method

pull/546/head
Steven Honson 2021-07-19 15:13:17 +10:00
rodzic 1cbf77851c
commit af22ea450c
1 zmienionych plików z 16 dodań i 2 usunięć

Wyświetl plik

@ -30,8 +30,17 @@ jobs:
- name: Setup Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Layers
uses: actions/cache@v2
with:
path: /tmp/buildx-cache
key: buildx-cache-${{ github.sha }}
restore-keys: |
buildx-cache-
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@ -42,8 +51,13 @@ jobs:
with:
context: .
platforms: linux/amd64, linux/386, linux/arm64, linux/arm/v6, linux/arm/v7
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:build-cache
cache-to: type=registry,mode=max,ref=ghcr.io/${{ github.repository }}:build-cache
cache-from: type=local,src=/tmp/buildx-cache
cache-to: type=local,dest=/tmp/buildx-cache-new,mode=max
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Move Cache
run: |
rm -rf /tmp/buildx-cache
mv /tmp/buildx-cache-new /tmp/buildx-cache