Skip to content

Commit 90f9130

Browse files
authored
CCM-12921: add proxy to destroy dynamic (#228)
* CCM-12921: add proxy to destroy dynamic * CCM-12921: permissions declaration
1 parent c9dc802 commit 90f9130

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/pr_destroy_dynamic_env.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.ref }}
99
cancel-in-progress: false
1010

11+
permissions:
12+
id-token: write
13+
contents: read
14+
1115
jobs:
12-
create-dynamic-environment:
16+
destroy-dynamic-environment:
1317
name: Destroy Dynamic Environment
1418
runs-on: ubuntu-latest
1519

@@ -32,3 +36,25 @@ jobs:
3236
--terraformAction "destroy" \
3337
--overrideProjectName "nhs" \
3438
--overrideRoleName "nhs-main-acct-supplier-api-github-deploy"
39+
40+
destroy-dynamic-proxy:
41+
name: Destroy Dynamic Proxy
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- uses: actions/checkout@v5
46+
47+
- name: Trigger dynamic proxy destruction
48+
env:
49+
APP_CLIENT_ID: ${{ secrets.APP_CLIENT_ID }}
50+
APP_PEM_FILE: ${{ secrets.APP_PEM_FILE }}
51+
shell: bash
52+
run: |
53+
.github/scripts/dispatch_internal_repo_workflow.sh \
54+
--infraRepoName "nhs-notify-supplier-api" \
55+
--releaseVersion "main" \
56+
--targetComponent "api" \
57+
--targetWorkflow "proxy-destroy.yaml" \
58+
--targetEnvironment "pr${{ github.event.number }}" \
59+
--apimEnvironment "internal-dev-sandbox" \
60+
--boundedContext "notify-supplier"

0 commit comments

Comments
 (0)