Skip to content

Commit

Permalink
testing automation cleanup flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-Microsoft committed Aug 28, 2024
1 parent 64eb39b commit 1f65f1d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CleanUp Resources

on:
push:
branches:
- main
workflow_dispatch:

jobs:
az-cleanup:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Azure CLI
run: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az --version # Verify installation
- name: Login to Azure
run: |
az login --service-principal -u ${{ secrets.AUTO_AZURE_CLIENT_ID }} -p ${{ secrets.AUTO_AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AUTO_AZURE_TENANT_ID }}
az account set --subscription ${{ secrets.AUTO_AZURE_SUBSCRIPTION_ID }}
- name: Install Bicep CLI
run: az bicep install

- name: Delete Bicep Deployment
run: |
az deployment sub delete \
--name autoDemo \
--no-wait

0 comments on commit 1f65f1d

Please sign in to comment.