-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (38 loc) · 1.25 KB
/
delete_review_app.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
37
38
39
40
41
42
43
44
name: Delete review app on AKS
on:
pull_request:
branches:
- main
types:
- closed
jobs:
delete-review-app:
name: Delete Review App ${{ github.event.pull_request.number }}
concurrency: deploy_review_${{ github.event.pull_request.number }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Dependencies') }}
runs-on: ubuntu-latest
environment: review
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.8
terraform_wrapper: false
- uses: DFE-Digital/github-actions/set-kubelogin-environment@master
with:
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
- name: Terraform Destroy
run: |
make ci review terraform-destroy
env:
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
- name: Post Pull Request Comment
if: ${{ github.event_name == 'pull_request' }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: aks
message: |
Review app ECF2 deployed to <https://ec2-review-${{ github.event.number }}-web.test.teacherservices.cloud> was deleted