Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish images to GHCR alongside DockerHub #940

Merged
merged 1 commit into from
Oct 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
13 changes: 11 additions & 2 deletions .github/workflows/test-and-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}
8 changes: 8 additions & 0 deletions .github/workflows/workflow_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}