diff --git a/.github/workflows/stg-backend.yml b/.github/workflows/stg-backend.yml index 533bcbf..e117e0f 100644 --- a/.github/workflows/stg-backend.yml +++ b/.github/workflows/stg-backend.yml @@ -117,7 +117,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@v5 with: url-prefix: pr-${{ env.PR_NUMBER }} diff --git a/.github/workflows/stg-frontend.yml b/.github/workflows/stg-frontend.yml index 73cf52c..c3fa2bb 100644 --- a/.github/workflows/stg-frontend.yml +++ b/.github/workflows/stg-frontend.yml @@ -126,7 +126,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@v5 with: url-prefix: pr-${{ env.PR_NUMBER }}