From 82d09ea41d316c0abc88a70aa5c927bd66592474 Mon Sep 17 00:00:00 2001 From: Yves Lavoie Date: Mon, 30 Oct 2023 00:27:45 -0400 Subject: [PATCH] Push onto registry if pull request is merged into master --- .github/workflows/docker-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }}