generated from NHSDigital/nhs-notify-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (30 loc) · 1.13 KB
/
pr_create_dynamic_env.yaml
File metadata and controls
34 lines (30 loc) · 1.13 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
name: PR Create Environment
on:
pull_request:
types: [labeled, opened, synchronize, reopened, unlabeled, edited]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
id-token: write
contents: read
jobs:
create-dynamic-environment:
name: Create Dynamic Environment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- name: Trigger dynamic environment creation
env:
PR_TRIGGER_PAT: ${{ secrets.PR_TRIGGER_PAT }}
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 "branch" \
--targetAccountGroup "nhs-notify-template-management-dev" \
--terraformAction "apply" \
--overrides "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"