Skip to content

Delete Review App #1106

Delete Review App

Delete Review App #1106

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 }}
environment: aks-review
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
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"