Skip to content

Commit

Permalink
conditionally clean up azure resources
Browse files Browse the repository at this point in the history
Signed-off-by: Jianguo Ma <[email protected]>
  • Loading branch information
majguo committed Oct 23, 2024
1 parent 96f847e commit 415e247
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: azd up

on:
workflow_dispatch:
inputs:
deleteAzureResources:
description: 'Delete Azure resources at the end'
required: true
type: boolean
default: true
push:
# Run when commits are pushed to mainline branch (main or master)
# Set this to the mainline branch you are using
Expand Down Expand Up @@ -76,3 +82,7 @@ jobs:

- name: Deploy Application
run: azd deploy --no-prompt

- name: Delete Azure resources
if: ${{ always() && (github.event_name != 'workflow_dispatch' || inputs.deleteAzureResources) }}
run: azd down --no-prompt

0 comments on commit 415e247

Please sign in to comment.