Skip to content

Commit 5787bf1

Browse files
committed
also deploy to docker hub
1 parent 9912e49 commit 5787bf1

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ jobs:
4242
username: ${{ secrets.DOCKERHUB_USERNAME }}
4343
password: ${{ secrets.DOCKERHUB_TOKEN }}
4444

45+
# Push login to docker.io (default registry). Same creds as dhi.io,
46+
# but a separate registry endpoint so we can push the public image.
47+
- name: Login to Docker Hub (push)
48+
uses: docker/login-action@v4
49+
with:
50+
username: ${{ secrets.DOCKERHUB_USERNAME }}
51+
password: ${{ secrets.DOCKERHUB_TOKEN }}
52+
4553
- name: Login to GHCR
4654
uses: docker/login-action@v4
4755
with:
@@ -53,7 +61,9 @@ jobs:
5361
id: meta
5462
uses: docker/metadata-action@v6
5563
with:
56-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
64+
images: |
65+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
66+
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/reverse-proxy
5767
5868
# Build the per-arch image and push it by digest only. The "merge"
5969
# job below stitches the digests into one multi-arch manifest.
@@ -67,7 +77,7 @@ jobs:
6777
labels: ${{ steps.meta.outputs.labels }}
6878
cache-from: type=gha,scope=${{ matrix.platform }}
6979
cache-to: type=gha,scope=${{ matrix.platform }},mode=max
70-
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
80+
outputs: type=image,"name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},docker.io/${{ secrets.DOCKERHUB_USERNAME }}/reverse-proxy",push-by-digest=true,name-canonical=true,push=true
7181

7282
- name: Export digest
7383
run: |
@@ -109,11 +119,19 @@ jobs:
109119
username: ${{ github.actor }}
110120
password: ${{ secrets.GITHUB_TOKEN }}
111121

122+
- name: Login to Docker Hub (push)
123+
uses: docker/login-action@v4
124+
with:
125+
username: ${{ secrets.DOCKERHUB_USERNAME }}
126+
password: ${{ secrets.DOCKERHUB_TOKEN }}
127+
112128
- name: Extract image metadata
113129
id: meta
114130
uses: docker/metadata-action@v6
115131
with:
116-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
132+
images: |
133+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
134+
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/reverse-proxy
117135
tags: |
118136
type=semver,pattern={{version}}
119137
type=semver,pattern={{major}}.{{minor}}

0 commit comments

Comments
 (0)