diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index e0377ce..bfbcfbd 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -41,7 +41,7 @@ jobs: type=semver,pattern={{major}} type=sha - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' + if: ${{ github.ref == 'refs/heads/main' }} with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -74,7 +74,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/^.*://')"