fix docker cache to github packages

This commit is contained in:
Santiago Bernhardt
2023-06-24 21:36:19 +12:00
parent 7530fb0e23
commit ef3fe4dd52
2 changed files with 18 additions and 4 deletions

View File

@@ -51,6 +51,13 @@ jobs:
type=semver,pattern={{major}}
type=sha
- name: Log in to Github Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
@@ -66,5 +73,5 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=docker.io/jokobsk/pi.alert:buildcache
cache-to: type=registry,ref=docker.io/jokobsk/pi.alert:buildcache,mode=max
cache-from: type=registry,ref=ghcr.io/jokobsk/pi.alert:buildcache
cache-to: type=registry,ref=ghcr.io/jokobsk/pi.alert:buildcache,mode=max