diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index b1574c3..0117d18 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -26,7 +26,7 @@ jobs: - name: Build and push uses: docker/build-push-action@v5 with: - push: ${{ github.ref == 'refs/heads/master' && github.event_name == 'pull_request' }} + push: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'merged') }} tags: ghcr.io/${{github.repository_owner}}/ledgersmb_circleci-perl:${{ matrix.version }} build-args: | perl=${{ matrix.version }} @@ -52,7 +52,7 @@ jobs: - name: Build and push uses: docker/build-push-action@v5 with: - push: ${{ github.ref == 'refs/heads/master' && github.event_name == 'pull_request' }} + push: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'merged') }} tags: ghcr.io/${{github.repository_owner}}/ledgersmb_circleci-postgres:${{ matrix.version }} build-args: | version=${{ matrix.version }}