diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e50f48a..6379dde 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,6 +47,11 @@ jobs: run: | echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin + - name: Log into Docker Hub + if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }} + run: | + echo "${{ secrets.DOCKER_PASS }}" | docker login -u "${{ secrets.DOCKER_USER }}" --password-stdin + - name: Publish master image to ghcr.io if: ${{ github.ref == 'refs/heads/master' }} run: | @@ -72,11 +77,6 @@ jobs: -t "ghcr.io/${IMAGE_REPOSITORY}:latest" . fi - - name: Log into Docker Hub - if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }} - run: | - echo "${{ secrets.DOCKER_PASS }}" | docker login -u "${{ secrets.DOCKER_USER }}" --password-stdin - - name: Publish master image to Docker Hub if: ${{ github.ref == 'refs/heads/master' }} run: |