Use registry cache

pull/46/head
Steven Honson 2022-09-23 10:05:38 +10:00 zatwierdzone przez GitHub
rodzic 8ec7127a76
commit 8eec272d7f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 16 usunięć

Wyświetl plik

@ -28,14 +28,6 @@ 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'
@ -45,17 +37,12 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Images
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64, linux/386, linux/arm64, linux/arm/v6, linux/arm/v7
cache-from: type=local,src=/tmp/buildx-cache
cache-to: type=local,dest=/tmp/buildx-cache-new,mode=max
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,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