Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
Only login to docker on pushes to default branch
  • Loading branch information
PhilippvK authored Aug 4, 2024
1 parent 8de5d44 commit 996141c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: mvn -B install --file pom.xml
- name: Login to DockerHub
uses: docker/login-action@v2
if: ${{ github.repository == 'philippvk/playforia-minigolf' }}
if: ${{ github.repository == 'philippvk/playforia-minigolf' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
Expand Down

0 comments on commit 996141c

Please sign in to comment.