Skip to content

Commit 101bb3e

Browse files
committed
Add Docker Hub publishing to build workflow
- Add Docker Hub login step using DOCKERHUB_USERNAME and DOCKERHUB_TOKEN - Update metadata to publish to both GHCR and Docker Hub - Images will be available on docker.io/codebude/masscode-web
1 parent 08d31eb commit 101bb3e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/docker-build.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,20 @@ jobs:
5959
username: ${{ github.actor }}
6060
password: ${{ secrets.GITHUB_TOKEN }}
6161

62+
- name: Log in to Docker Hub
63+
uses: docker/login-action@v3
64+
with:
65+
registry: docker.io
66+
username: ${{ secrets.DOCKERHUB_USERNAME }}
67+
password: ${{ secrets.DOCKERHUB_TOKEN }}
68+
6269
- name: Extract metadata
6370
id: meta
6471
uses: docker/metadata-action@v5
6572
with:
66-
images: ghcr.io/${{ github.repository }}
73+
images: |
74+
ghcr.io/${{ github.repository }}
75+
docker.io/codebude/masscode-web
6776
tags: |
6877
type=raw,value=${{ steps.version-tag.outputs.tag }}
6978
type=raw,value=latest,enable=${{ inputs.tag_as_latest }}

0 commit comments

Comments
 (0)