diff --git a/.github/workflows/docker-tag-push.yml b/.github/workflows/docker-tag-push.yml index 9ded175b..bcb85ea1 100644 --- a/.github/workflows/docker-tag-push.yml +++ b/.github/workflows/docker-tag-push.yml @@ -54,11 +54,15 @@ jobs: - name: Login to Registry 🔐 if: env.PUSH_TO_REGISTRY == 'true' - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 - with: - registry: quay.io - username: ${{ secrets.REGISTRY_USERNAME }} - password: ${{ secrets.REGISTRY_TOKEN }} + run: | + docker login ${{ env.REGISTRY }} \ + --username ${{ secrets.REGISTRY_USERNAME }} \ + --password ${{ secrets.REGISTRY_TOKEN }} || \ + docker login ${{ env.REGISTRY }} \ + --username ${{ secrets.REGISTRY_USERNAME }} \ + --password ${{ secrets.REGISTRY_TOKEN }} + shell: bash + id: login - name: Push single platform images to Registry 📤 if: env.PUSH_TO_REGISTRY == 'true' @@ -74,3 +78,9 @@ jobs: --variant ${{ inputs.variant }} \ --tags-dir /tmp/jupyter/tags/ shell: bash + + - name: Logout from Registry 🔐 + if: always() && env.PUSH_TO_REGISTRY == 'true' && steps.login.outcome == 'success' + run: | + docker logout ${{ env.REGISTRY }} + shell: bash