diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 8056c8e..bc65540 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -23,16 +23,10 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Check if pull request is merged into master - id: check-merge - run: | - from_branch="${{ github.event.pull_request.head.ref }}" - to_branch="${{ github.event.pull_request.base.ref }}" - echo "{is_merge_into_master}={"$from_branch" != "$to_branch" && "$to_branch" == "master"}" >> $GITHUB_OUTPUT - name: Build and push uses: docker/build-push-action@v5 with: - push: ${{ steps.check-merge.outputs.is_merge_into_master == 'true' }} + push: ${{ github.event.pull_request.merged == true }} tags: ghcr.io/${{github.repository_owner}}/ledgersmb_circleci-perl:${{ matrix.version }} build-args: | perl=${{ matrix.version }} @@ -55,16 +49,10 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Check if pull request is merged into master - id: check-merge - run: | - from_branch="${{ github.event.pull_request.head.ref }}" - to_branch="${{ github.event.pull_request.base.ref }}" - echo "{is_merge_into_master}={"$from_branch" != "$to_branch" && "$to_branch" == "master"}" >> $GITHUB_OUTPUT - name: Build and push uses: docker/build-push-action@v5 with: - push: ${{ steps.check-merge.outputs.is_merge_into_master == 'true' }} + push: ${{ github.event.pull_request.merged == true }} tags: ghcr.io/${{github.repository_owner}}/ledgersmb_circleci-postgres:${{ matrix.version }} build-args: | version=${{ matrix.version }}