fix docker cache to github packages
This commit is contained in:
11
.github/workflows/docker_dev.yml
vendored
11
.github/workflows/docker_dev.yml
vendored
@@ -51,6 +51,13 @@ jobs:
|
|||||||
type=semver,pattern={{major}}
|
type=semver,pattern={{major}}
|
||||||
type=sha
|
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
|
- name: Login to DockerHub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@@ -66,5 +73,5 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=registry,ref=docker.io/jokobsk/pi.alert:buildcache
|
cache-from: type=registry,ref=ghcr.io/jokobsk/pi.alert:buildcache
|
||||||
cache-to: type=registry,ref=docker.io/jokobsk/pi.alert:buildcache,mode=max
|
cache-to: type=registry,ref=ghcr.io/jokobsk/pi.alert:buildcache,mode=max
|
||||||
|
|||||||
11
.github/workflows/docker_prod.yml
vendored
11
.github/workflows/docker_prod.yml
vendored
@@ -58,6 +58,13 @@ jobs:
|
|||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
|
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
|
||||||
|
|
||||||
|
- 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
|
- name: Login to DockerHub
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@@ -73,5 +80,5 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=registry,ref=docker.io/jokobsk/pi.alert:buildcache
|
cache-from: type=registry,ref=ghcr.io/jokobsk/pi.alert:buildcache
|
||||||
cache-to: type=registry,ref=docker.io/jokobsk/pi.alert:buildcache,mode=max
|
cache-to: type=registry,ref=ghcr.io/jokobsk/pi.alert:buildcache,mode=max
|
||||||
|
|||||||
Reference in New Issue
Block a user