CCM-12082: Setting retention period of backup recovery points to 31 days as per NHSE guidelines #343
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Destroy Environment | |
| on: | |
| pull_request: | |
| types: [closed] | |
| 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/[email protected] | |
| - name: Trigger dynamic environment destruction | |
| 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 "main" \ | |
| --targetWorkflow "dispatch-deploy-dynamic-env.yaml" \ | |
| --targetEnvironment "pr${{ github.event.number }}" \ | |
| --targetComponent "branch" \ | |
| --targetAccountGroup "nhs-notify-template-management-dev" \ | |
| --terraformAction "destroy" | |
| sandbox-tear-down: | |
| name: Destroy Sandbox Environment | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - name: Trigger sandbox environment destruction | |
| shell: bash | |
| env: | |
| PR_TRIGGER_PAT: ${{ secrets.PR_TRIGGER_PAT }} | |
| run: | | |
| .github/scripts/dispatch_internal_repo_workflow.sh \ | |
| --infraRepoName "nhs-notify-web-template-management" \ | |
| --releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \ | |
| --targetWorkflow "dispatch-deploy-dynamic-env.yaml" \ | |
| --targetEnvironment "pr${{ github.event.number }}" \ | |
| --targetAccountGroup "nhs-notify-template-management-dev" \ | |
| --targetComponent "sandbox" \ | |
| --terraformAction "destroy" |