generated from NHSDigital/nhs-notify-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (53 loc) · 1.86 KB
/
pr_destroy_dynamic_env.yaml
File metadata and controls
62 lines (53 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: PR Destroy Environment
on:
pull_request:
types: [closed]
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
id-token: write
contents: read
jobs:
destroy-dynamic-environment:
name: Destroy Dynamic Environment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Trigger dynamic environment destruction
env:
APP_CLIENT_ID: ${{ secrets.APP_CLIENT_ID }}
APP_PEM_FILE: ${{ secrets.APP_PEM_FILE }}
shell: bash
run: |
.github/scripts/dispatch_internal_repo_workflow.sh \
--infraRepoName "$(echo ${{ github.repository }} | cut -d'/' -f2)" \
--releaseVersion "main" \
--targetWorkflow "dispatch-deploy-dynamic-env.yaml" \
--targetEnvironment "pr${{ github.event.number }}" \
--targetComponent "api" \
--targetAccountGroup "nhs-notify-supplier-api-dev" \
--terraformAction "destroy" \
--overrideProjectName "nhs" \
--overrideRoleName "nhs-main-acct-supplier-api-github-deploy"
destroy-dynamic-proxy:
name: Destroy Dynamic Proxy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Trigger dynamic proxy destruction
env:
APP_CLIENT_ID: ${{ secrets.APP_CLIENT_ID }}
APP_PEM_FILE: ${{ secrets.APP_PEM_FILE }}
shell: bash
run: |
.github/scripts/dispatch_internal_repo_workflow.sh \
--infraRepoName "nhs-notify-supplier-api" \
--releaseVersion "main" \
--targetComponent "api" \
--targetWorkflow "proxy-destroy.yaml" \
--targetEnvironment "pr${{ github.event.number }}" \
--apimEnvironment "internal-dev-sandbox" \
--boundedContext "notify-supplier"