Skip to content

Commit 32619af

Browse files
committed
CCM-11908: Test
1 parent c4bcc6d commit 32619af

File tree

1 file changed

+13
-32
lines changed

1 file changed

+13
-32
lines changed

.github/workflows/pr_create_dynamic_env.yaml

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,16 @@ jobs:
1616

1717
steps:
1818
- name: Trigger nhs-notify-internal dynamic environment workflow
19-
shell: bash
20-
run: |
21-
set -x
22-
this_repo_name=$(echo ${{ github.repository }} | cut -d'/' -f2)
23-
24-
DISPATCH_EVENT=$(jq -ncM \
25-
--arg infraRepoName "${this_repo_name}" \
26-
--arg releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
27-
--arg targetEnvironment "pr${{ github.event.number }}" \
28-
--arg targetAccountGroup "nhs-notify-template-management-dev" \
29-
--arg targetComponent "branch" \
30-
--arg terraformAction "apply" \
31-
--arg overrides "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
32-
'{ "ref": "main",
33-
"inputs": {
34-
"infraRepoName": $infraRepoName,
35-
"releaseVersion", $releaseVersion,
36-
"targetEnvironment", $targetEnvironment,
37-
"targetAccountGroup", $targetAccountGroup,
38-
"targetComponent", $targetComponent,
39-
"terraformAction", $terraformAction,
40-
"overrides", $overrides,
41-
}
42-
}')
43-
44-
curl --fail -L \
45-
-X POST \
46-
-H "Accept: application/vnd.github+json" \
47-
-H "Authorization: Bearer ${{ secrets.PR_TRIGGER_PAT }}" \
48-
-H "X-GitHub-Api-Version: 2022-11-28" \
49-
https://api.github.com/repos/NHSDigital/nhs-notify-internal/actions/workflows/dispatch-deploy-dynamic-env.yaml/dispatches \
50-
-d "${DISPATCH_EVENT}"
19+
needs: generate-sandbox-name
20+
uses: ./.github/workflows/dispatch_internal_repo_workflow.yaml
21+
secrets: inherit
22+
with:
23+
jobName: Sandbox set up
24+
infraRepoName: nhs-notify-web-template-management
25+
releaseVersion: ${{ github.head_ref || github.ref_name }}
26+
targetWorkflow: dispatch-deploy-dynamic-env.yaml
27+
targetEnvironment: pr${{ github.event.number }}
28+
targetAccountGroup: nhs-notify-template-management-dev
29+
targetComponent: branch
30+
terraformAction: apply
31+
overrides: branch_name=${{ github.head_ref || github.ref_name }}

0 commit comments

Comments
 (0)