From f7b96ecdcf8a68cb9ed6959ff94414b5f495d4e8 Mon Sep 17 00:00:00 2001 From: jamesthompson26-nhs Date: Tue, 25 Nov 2025 10:46:01 +0000 Subject: [PATCH 1/2] CCM-13276: No Dynamic Env on Merge to Main --- .github/workflows/cicd-1-pull-request.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cicd-1-pull-request.yaml b/.github/workflows/cicd-1-pull-request.yaml index a44b4ddfe..ec98100e0 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: github.ref != 'refs/heads/main' steps: - uses: actions/checkout@v5.0.0 - name: Trigger dynamic environment creation From 9368775f9b315065e98038d480edf1f2af23e4c3 Mon Sep 17 00:00:00 2001 From: jamesthompson26-nhs Date: Tue, 25 Nov 2025 11:15:31 +0000 Subject: [PATCH 2/2] CCM-13276: No Dynamic Env on Merge to Main --- .github/workflows/cicd-1-pull-request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd-1-pull-request.yaml b/.github/workflows/cicd-1-pull-request.yaml index ec98100e0..158b46e27 100644 --- a/.github/workflows/cicd-1-pull-request.yaml +++ b/.github/workflows/cicd-1-pull-request.yaml @@ -127,7 +127,7 @@ jobs: name: Create Dynamic Environment needs: [metadata, dependencies, commit-stage] runs-on: ubuntu-latest - if: github.ref != 'refs/heads/main' + 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 @@ -147,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