Skip to content

Commit 2bc6859

Browse files
author
Harmanpreet Kaur
committed
edited deploy
1 parent 5545069 commit 2bc6859

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,7 @@ jobs:
6868
--template-file Deployment/bicep/main.bicep \
6969
--parameters solutionPrefix=${{ env.SOLUTION_PREFIX }} otherLocation=centralus imageTag=${{ steps.determine_tag.outputs.tagname }}
7070
71-
- name: Delete Bicep Deployment
72-
if: success()
73-
run: |
74-
set -e
75-
echo "Checking if resource group exists..."
76-
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
77-
if [ "$rg_exists" = "true" ]; then
78-
echo "Resource group exist. Cleaning..."
79-
az group delete \
80-
--name ${{ env.RESOURCE_GROUP_NAME }} \
81-
--yes \
82-
--no-wait
83-
echo "Resource group deleted... ${{ env.RESOURCE_GROUP_NAME }}"
84-
else
85-
echo "Resource group does not exists."
86-
fi
71+
8772

8873
- name: Send Notification on Failure
8974
if: failure()
@@ -102,3 +87,22 @@ jobs:
10287
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
10388
-H "Content-Type: application/json" \
10489
-d "$EMAIL_BODY" || echo "Failed to send notification"
90+
91+
92+
- name: Delete Bicep Deployment
93+
94+
run: |
95+
set -e
96+
echo "Checking if resource group exists..."
97+
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
98+
if [ "$rg_exists" = "true" ]; then
99+
echo "Resource group exist. Cleaning..."
100+
az group delete \
101+
--name ${{ env.RESOURCE_GROUP_NAME }} \
102+
--yes \
103+
--no-wait
104+
echo "Resource group deleted... ${{ env.RESOURCE_GROUP_NAME }}"
105+
else
106+
echo "Resource group does not exists."
107+
fi
108+

0 commit comments

Comments
 (0)