Skip to content

[CAPT-649] Correct field types #722

[CAPT-649] Correct field types

[CAPT-649] Correct field types #722

name: Delete review app on AKS
on:
pull_request:
types: [closed, unlabeled]
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 }}
runs-on: ubuntu-latest
if: >
github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'deploy') ||
(github.event.action == 'unlabeled' && github.event.label.name == 'deploy') || (github.event_name ==
'workflow_dispatch')
environment: review
permissions:
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.8.4
terraform_wrapper: false
- uses: DFE-Digital/github-actions/set-kubelogin-environment@master
with:
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
- uses: google-github-actions/auth@v2
with:
project_id: claim-additional-payments
workload_identity_provider: projects/638192024625/locations/global/workloadIdentityPools/claim-additional-payments-for-te/providers/claim-additional-payments-for-te
- name: Terraform destroy
run: |
if [ ${{ github.event_name }} == 'workflow_dispatch' ]; then
PR_NUMBER=${{ github.event.inputs.pr_number }}
else
PR_NUMBER=${{ github.event.pull_request.number }}
fi
if [ -z "$PR_NUMBER" ]; then
echo "::error ::Failed to extract PR_NUMBER"
exit 1
fi
make ci review terraform-destroy PR_NUMBER=$PR_NUMBER