From 996141ca61cddaa425f69ddb6f44022547d702f1 Mon Sep 17 00:00:00 2001 From: Philipp van Kempen Date: Sun, 4 Aug 2024 19:57:32 +0200 Subject: [PATCH] Update build.yml Only login to docker on pushes to default branch --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4826c2e0..158a13f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }}