Publish images to GHCR alongside DockerHub (#940)
Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
This commit is contained in:
parent
c0d05f291d
commit
e874dc1f3e
|
@ -46,6 +46,13 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_PASS }}
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
|
@ -59,4 +66,5 @@ jobs:
|
|||
PIHOLE_VERSION=nightly
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_NAMESPACE }}/pihole:nightly
|
||||
${{ secrets.DOCKERHUB_NAMESPACE }}/pihole:nightly
|
||||
ghcr.io/${{ github.repository_owner }}/pihole:nightly
|
||||
|
|
|
@ -38,7 +38,9 @@ jobs:
|
|||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_NAMESPACE }}/pihole
|
||||
images: |
|
||||
${{ secrets.DOCKERHUB_NAMESPACE }}/pihole
|
||||
ghcr.io/${{ github.repository_owner }}/pihole
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: Set up QEMU
|
||||
|
@ -52,6 +54,13 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_PASS }}
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
|
@ -62,4 +71,4 @@ jobs:
|
|||
PIHOLE_VERSION=${{ env.TAG }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
|
|
@ -51,6 +51,13 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USER }}
|
||||
password: ${{ secrets.DOCKERHUB_PASS }}
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
|
@ -65,3 +72,4 @@ jobs:
|
|||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_NAMESPACE }}/pihole:${{ github.event.inputs.name }}
|
||||
ghcr.io/${{ github.repository_owner }}/pihole:${{ github.event.inputs.name }}
|
||||
|
|
Loading…
Reference in New Issue