diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 147ad0f1..f8b2b723 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -34,6 +34,16 @@ 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) + + - uses: actions/checkout@v3 + if: |- + github.event_name == 'pull_request' && startsWith(github.head_ref,'build/') || + ( 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