Delete Azure Resource Group #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete Azure Resource Group | |
on: | |
workflow_dispatch: | |
jobs: | |
destroy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
# Checkout code | |
- uses: actions/checkout@main | |
# Log into Azure | |
- uses: azure/[email protected] | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
enable-AzPSSession: true | |
# Delete Resource Group | |
- name: Azure CLI script | |
uses: Azure/CLI@v1 | |
with: | |
inlineScript: | | |
#!/bin/bash | |
az group delete --name ${{ secrets.AZURE_RG }} --yes --no-wait | |
echo "Resource Group Deleted" |