-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (32 loc) · 1.26 KB
/
pr_destroy_dynamic_env.yaml
File metadata and controls
36 lines (32 loc) · 1.26 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
name: PR Destroy Environment
on:
pull_request:
types: [closed]
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
create-dynamic-environment:
name: Destroy Dynamic Environment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Trigger dynamic environment creation
env:
APP_PEM_FILE: ${{ secrets.APP_PEM_FILE }}
APP_CLIENT_ID: ${{ secrets.APP_CLIENT_ID }}
shell: bash
run: |
.github/scripts/dispatch_internal_repo_workflow.sh \
--infraRepoName "$(echo ${{ github.repository }} | cut -d'/' -f2)" \
--releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
--targetWorkflow "dispatch-deploy-dynamic-env.yaml" \
--targetEnvironment "pr${{ github.event.number }}" \
--targetComponent "dl" \
--targetAccountGroup "nhs-notify-digital-letters-dev" \
--terraformAction "destroy" \
--overrideProjectName "nhs" \
--overrideRoleName "nhs-main-acct-digital-letters-github-deploy" \
--overrides "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"