@@ -8,12 +8,28 @@ permissions:
88 contents : read
99
1010jobs :
11- acceptance-tests :
12- name : Acceptance Tests
11+
12+ create-sandbox-environment :
13+ name : Create Sandbox Environment
1314 runs-on : ubuntu-latest
1415 steps :
15161617
18+ - name : Trigger sandbox environment creation
19+ shell : bash
20+ env :
21+ PR_TRIGGER_PAT : ${{ secrets.PR_TRIGGER_PAT }}
22+ run : |
23+ .github/scripts/dispatch_internal_repo_workflow.sh \
24+ --jobName "Create PR Sandbox " \
25+ --infraRepoName "nhs-notify-web-template-management" \
26+ --releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
27+ --targetWorkflow "dispatch-deploy-dynamic-env.yaml" \
28+ --targetEnvironment "pr${{ github.event.number }}" \
29+ --targetAccountGroup "nhs-notify-template-management-dev" \
30+ --targetComponent "sandbox" \
31+ --terraformAction "apply"
32+
1733 - name : Acceptance Tests
1834 shell : bash
1935 env :
2238 .github/scripts/dispatch_internal_repo_workflow.sh \
2339 --jobName "Acceptance tests" \
2440 --infraRepoName "nhs-notify-web-template-management" \
25- --releaseVersion "${{ github.head_ref || github.ref_name }}" \
41+ --releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/ }}" \
2642 --targetWorkflow "dispatch-contextual-tests-dynamic-env.yaml" \
2743 --targetEnvironment "${{ needs.generate-sandbox-name.outputs.SANDBOX_NAME }}" \
2844 --targetAccountGroup "nhs-notify-template-management-dev" \
29- --targetComponent "sandbox"
45+ --targetComponent "sandbox"
0 commit comments