diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 147ad0f1..7dfe7113 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -34,6 +34,15 @@ jobs: uses: docker/setup-buildx-action@v3 - uses: actions/checkout@v3 + if: |- + github.event.pull_request.merged == true || + contains(fromJson('["schedule", "workflow_dispatch"]'), github.event_name) || + github.event_name == 'pull_request' && startsWith(github.head_ref,'build/') + + - uses: actions/checkout@v3 + if: ( github.event.issue.pull_request && contains(github.event.comment.body, '/build') ) + with: + ref: refs/pull/${{ github.event.issue.number }}/head - name: Login to registry ${{ env.REGISTRY }} uses: docker/login-action@v2.2.0