Skip to content

Commit d8624f2

Browse files
committed
Add Docker Hub login to release workflow
Add docker/login-action@v2 steps to .github/workflows/release.yml across the release jobs so the workflow authenticates to Docker Hub before extracting metadata and creating/pushing manifests. The steps use DOCKERHUB_USERNAME and DOCKERHUB_TOKEN secrets to enable pushing images/manifests to Docker Hub.
1 parent b06b927 commit d8624f2

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ jobs:
3636
with:
3737
registry-type: public
3838

39+
- name: Login to Docker Hub
40+
uses: docker/login-action@v2
41+
with:
42+
username: ${{ secrets.DOCKERHUB_USERNAME }}
43+
password: ${{ secrets.DOCKERHUB_TOKEN }}
44+
3945
- name: Extract metadata (tags, labels) for Docker
4046
id: meta
4147
uses: docker/metadata-action@v4
@@ -85,6 +91,12 @@ jobs:
8591
with:
8692
registry-type: public
8793

94+
- name: Login to Docker Hub
95+
uses: docker/login-action@v2
96+
with:
97+
username: ${{ secrets.DOCKERHUB_USERNAME }}
98+
password: ${{ secrets.DOCKERHUB_TOKEN }}
99+
88100
- name: Extract metadata (tags, labels) for Docker
89101
id: meta
90102
uses: docker/metadata-action@v4
@@ -133,6 +145,12 @@ jobs:
133145
with:
134146
registry-type: public
135147

148+
- name: Login to Docker Hub
149+
uses: docker/login-action@v2
150+
with:
151+
username: ${{ secrets.DOCKERHUB_USERNAME }}
152+
password: ${{ secrets.DOCKERHUB_TOKEN }}
153+
136154
- name: Create manifest list and push
137155
run: |
138156
# Get the metadata from arm64 build to extract tags
@@ -172,6 +190,12 @@ jobs:
172190
with:
173191
registry-type: public
174192

193+
- name: Login to Docker Hub
194+
uses: docker/login-action@v2
195+
with:
196+
username: ${{ secrets.DOCKERHUB_USERNAME }}
197+
password: ${{ secrets.DOCKERHUB_TOKEN }}
198+
175199
- name: Create manifest list and push
176200
run: |
177201
tags=$(echo '${{ needs.build-embedding-arm64.outputs.metadata }}' | jq -r '.tags[]')

0 commit comments

Comments
 (0)