diff --git a/.github/workflows/staging-docker.yml b/.github/workflows/staging-docker.yml index afb18bb2..b120585f 100644 --- a/.github/workflows/staging-docker.yml +++ b/.github/workflows/staging-docker.yml @@ -118,7 +118,7 @@ jobs: app: ${{ env.APP }} - name: Staging undeploy - if: github.event_name == 'pull_request' && github.event.action == 'closed' && startsWith(github.head_ref, 'release') != true + if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'release') != true uses: aeternity/ae-github-actions/argocd-undeploy@v4 with: url-prefix: pr-${{ env.PR_NUMBER }}