diff --git a/.github/workflows/docker_main.yml b/.github/workflows/docker_main.yml index cb72b20..ef2fa40 100644 --- a/.github/workflows/docker_main.yml +++ b/.github/workflows/docker_main.yml @@ -2,8 +2,9 @@ name: Docker Main Build on: push: - branches: - - main + branches: [main] + pull_request: + branches: [main] jobs: docker: @@ -32,14 +33,17 @@ jobs: --tag ghcr.io/hyperledger/firefly-tokens-erc1155:${{ steps.build_tag_generator.outputs.BUILD_TAG }} . - name: Tag release + if: github.event.pull_request.merged == true run: docker tag ghcr.io/hyperledger/firefly-tokens-erc1155:${{ steps.build_tag_generator.outputs.BUILD_TAG }} ghcr.io/hyperledger/firefly-tokens-erc1155:head - name: Push docker image + if: github.event.pull_request.merged == true run: | echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin docker push ghcr.io/hyperledger/firefly-tokens-erc1155:${{ steps.build_tag_generator.outputs.BUILD_TAG }} - name: Push head tag + if: github.event.pull_request.merged == true run: | echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin docker push ghcr.io/hyperledger/firefly-tokens-erc1155:head