-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 880 Bytes
/
teardown-all.yml
File metadata and controls
36 lines (30 loc) · 880 Bytes
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: Teardown All Demo Apps
on:
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
approve:
runs-on: ubuntu-latest
environment: prod
steps:
- run: echo "Teardown approved"
teardown:
needs: approve
runs-on: ubuntu-latest
strategy:
matrix:
rg: ['rg-cq-demo-001', 'rg-cq-demo-002', 'rg-cq-demo-003', 'rg-cq-demo-004', 'rg-cq-demo-005']
steps:
- name: Azure Login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Delete Resource Group
run: az group delete --name ${{ matrix.rg }} --yes --no-wait
- name: Summary
run: |
echo "### 🗑️ Deleted ${{ matrix.rg }}" >> $GITHUB_STEP_SUMMARY