save cache to registry
Some checks failed
Check / checks (push) Has been cancelled
Release / buildpush (release) Failing after 48m37s

This commit is contained in:
Gustavo Maronato 2024-03-26 17:48:22 -04:00
parent 2336830d37
commit 97491adbe2
Signed by: maronato
SSH Key Fingerprint: SHA256:2Gw7kwMz/As+2UkR1qQ/qYYhn+WNh3FGv6ozhoRrLcs

View File

@ -11,6 +11,8 @@ jobs:
permissions:
contents: read
packages: write
env:
IMAGE_NAME: git.maronato.dev/${{ github.repository }}
steps:
- # Get the repository's code
name: Checkout
@ -45,7 +47,7 @@ jobs:
with:
# The container image name needs the custom registry in it.
# Maybe there is a default env var for this?
images: git.maronato.dev/${{ github.repository }}
images: ${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
@ -76,8 +78,8 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max
# - # Temp fix
# # https://github.com/docker/build-push-action/issues/252
# # https://github.com/moby/buildkit/issues/1896