Skip to content

Commit

Permalink
Fix Docker action not logging in to Docker Hub for tag builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Insprill authored Apr 20, 2024
1 parent 8c8d763 commit d6b434a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:

- name: Login to DockerHub
uses: docker/login-action@v3
if: ${{ !env.ACT && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
if: ${{ !env.ACT && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) && github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
if: ${{ !env.ACT && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
if: $${{ !env.ACT && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) && github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down

0 comments on commit d6b434a

Please sign in to comment.