-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (46 loc) · 1.62 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
45
46
47
48
49
name: Delete Review App
on:
pull_request:
types: [closed]
branches: [main]
workflow_dispatch:
inputs:
pr_number:
description: PR number of review app to delete
required: true
type: string
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, 'deploy-aks') || ${{ github.event_name }} == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- name: set PR_NUMBER
id: config
run: |
if [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
PR_NUMBER=${{ github.event.inputs.pr_number }}
else
PR_NUMBER=${{ github.event.pull_request.number }}
fi
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
- name: Delete Review App
id: delete-review-app
environment: aks-review
uses: DFE-Digital/github-actions/delete-review-app@delete-review-app
with:
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
gcp-wip: ${{ vars.GCP_WIP }}
gcp-project-id: ${{ vars.GCP_PROJECT_ID }}
environment: aks-review
github-event-name: ${{ github.event_name }}
global-config: review
pr-number: ${{ env.PR_NUMBER }}
service-name: refer-serious-misconduct
service-pretty: Refer Serious Misconduct
service-short: rsm
terraform-destroy-command: "aks-terraform-destroy"