Skip to content

Commit 6bfc6d8

Browse files
committed
Also publish to Docker Hub
1 parent f9327f6 commit 6bfc6d8

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/docker-publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,20 @@ jobs:
3939
username: ${{ github.actor }}
4040
password: ${{ secrets.GITHUB_TOKEN }}
4141

42+
- name: Log in to Docker Hub
43+
if: github.event_name != 'pull_request'
44+
uses: docker/login-action@v3
45+
with:
46+
username: ${{ secrets.DOCKERHUB_USERNAME }}
47+
password: ${{ secrets.DOCKERHUB_TOKEN }}
48+
4249
- name: Extract metadata (tags, labels) for Docker
4350
id: meta
4451
uses: docker/metadata-action@v5
4552
with:
46-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
53+
images: |
54+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
55+
${{ env.IMAGE_NAME }}
4756
tags: |
4857
type=ref,event=branch
4958
type=ref,event=pr

0 commit comments

Comments
 (0)