diff --git a/.github/workflows/cicd-1-pull-request.yaml b/.github/workflows/cicd-1-pull-request.yaml index a44b4ddfe..158b46e27 100644 --- a/.github/workflows/cicd-1-pull-request.yaml +++ b/.github/workflows/cicd-1-pull-request.yaml @@ -127,6 +127,7 @@ jobs: name: Create Dynamic Environment needs: [metadata, dependencies, commit-stage] runs-on: ubuntu-latest + if: needs.metadata.outputs.does_pull_request_exist == 'true' && github.ref != 'refs/heads/main' steps: - uses: actions/checkout@v5.0.0 - name: Trigger dynamic environment creation @@ -146,7 +147,7 @@ jobs: --overrides "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" acceptance-stage: # Recommended maximum execution time is 10 minutes name: "Acceptance stage" - needs: [metadata, dependencies, test-stage, pr-create-dynamic-environment] + needs: [metadata, dependencies, test-stage] uses: ./.github/workflows/stage-4-acceptance.yaml if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened')) || (github.event_name == 'push' && github.ref == 'refs/heads/main') secrets: inherit