Skip to content

Commit 72f85f6

Browse files
committed
ci: Add Docker Hub image push to workflow
1 parent f37a1a0 commit 72f85f6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/docker-build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,20 @@ jobs:
4141
registry: ghcr.io
4242
username: ${{ github.actor }}
4343
password: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Log in to Docker Hub
46+
uses: docker/login-action@v3
47+
with:
48+
username: ${{ secrets.DOCKERHUB_USERNAME }}
49+
password: ${{ secrets.DOCKERHUB_TOKEN }}
4450

4551
- name: Extract metadata for Docker
4652
id: meta
4753
uses: docker/metadata-action@v5
4854
with:
49-
images: ghcr.io/${{ github.repository }}
55+
images: |
56+
ghcr.io/${{ github.repository }}
57+
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
5058
tags: |
5159
type=semver,pattern={{version}}
5260
type=semver,pattern={{major}}.{{minor}}

0 commit comments

Comments
 (0)