Skip to content

Commit cbe74ff

Browse files
authored
Retry login operation in docker-tag-push.yml (#2286)
1 parent 81bf722 commit cbe74ff

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

Diff for: .github/workflows/docker-tag-push.yml

+15-5
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,15 @@ jobs:
5454

5555
- name: Login to Registry 🔐
5656
if: env.PUSH_TO_REGISTRY == 'true'
57-
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
58-
with:
59-
registry: quay.io
60-
username: ${{ secrets.REGISTRY_USERNAME }}
61-
password: ${{ secrets.REGISTRY_TOKEN }}
57+
run: |
58+
docker login ${{ env.REGISTRY }} \
59+
--username ${{ secrets.REGISTRY_USERNAME }} \
60+
--password ${{ secrets.REGISTRY_TOKEN }} || \
61+
docker login ${{ env.REGISTRY }} \
62+
--username ${{ secrets.REGISTRY_USERNAME }} \
63+
--password ${{ secrets.REGISTRY_TOKEN }}
64+
shell: bash
65+
id: login
6266

6367
- name: Push single platform images to Registry 📤
6468
if: env.PUSH_TO_REGISTRY == 'true'
@@ -74,3 +78,9 @@ jobs:
7478
--variant ${{ inputs.variant }} \
7579
--tags-dir /tmp/jupyter/tags/
7680
shell: bash
81+
82+
- name: Logout from Registry 🔐
83+
if: always() && env.PUSH_TO_REGISTRY == 'true' && steps.login.outcome == 'success'
84+
run: |
85+
docker logout ${{ env.REGISTRY }}
86+
shell: bash

0 commit comments

Comments
 (0)