-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 1.02 KB
/
delete-deployment.yml
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: Delete deployment
run-name: ${{ github.event.pull_request.title || format('Delete deployment [{0}]', github.head_ref || github.ref_name) }}
on:
workflow_dispatch:
pull_request:
types: [closed]
permissions:
id-token: write
contents: read
concurrency: deploy-development-${{ github.head_ref || github.ref_name }}
jobs:
delete-stack:
name: Delete stack
runs-on: ubuntu-latest
environment: development
steps:
- name: Get stack name
uses: govuk-one-login/github-actions/beautify-branch-name@e6b6ed890b35904e1be79f7f35ffec983fa4d9db
id: get-stack-name
with:
usage: Stack name
prefix: preview-check-hmrc-api
length-limit: 128
verbose: false
- name: Delete stack
uses: govuk-one-login/github-actions/sam/delete-stacks@e6b6ed890b35904e1be79f7f35ffec983fa4d9db
with:
stack-names: ${{ steps.get-stack-name.outputs.pretty-branch-name }}
aws-role-arn: ${{ vars.DEPLOYMENT_ROLE_ARN }}
verbose: true