From 9c7fcb0093c65edb5da9c3881154907c86ce72ad Mon Sep 17 00:00:00 2001 From: Thomas Leplus Date: Mon, 8 Apr 2024 12:30:42 -0300 Subject: [PATCH] Run only on master --- .github/workflows/dockerimage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 2f59745..6e0ecd8 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -36,7 +36,7 @@ jobs: type=semver,pattern={{major}} type=sha - uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 - if: github.event_name != 'pull_request' + if: github.ref == 'refs/heads/main' with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -53,7 +53,7 @@ jobs: working-directory: ${{ env.IMAGE }} run: docker compose -f docker-compose.test.yml run sut - name: Set RELEASE - if: github.event_name != 'pull_request' + if: github.ref == 'refs/heads/main' run: | # shellcheck disable=SC2086 RC="$(\grep ${IMAGE}/Dockerfile -e '^FROM' | \head -n 1 | \sed -e 's/^.*://')"