Skip to content

Commit b0dcad5

Browse files
fix: update AZURE_ENV_NAME and set AZURE_RESOURCE_GROUP in destroy target
1 parent 5ad67fa commit b0dcad5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,10 @@ jobs:
402402
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
403403
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
404404
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
405-
AZURE_ENV_NAME: ${{ github.run_id }}
405+
AZURE_ENV_NAME: ${{ needs.deploy.outputs.solution_suffix }} # Get from deploy job
406406
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
407407
imageTag: ${{ needs.deploy.outputs.imageTag }}
408-
AZURE_RESOURCE_GROUP: ${{ needs.deploy.outputs.resource_group }} # Add this line
408+
AZURE_RESOURCE_GROUP: ${{ needs.deploy.outputs.resource_group }}
409409

410410
steps:
411411
- name: Checkout code

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ disable-auth-fixed:
178178

179179
destroy: azd-login ## 🧨 Destroy everything in Azure
180180
@if [ -n "$(AZURE_RESOURCE_GROUP)" ]; then \
181+
azd env select ${AZURE_ENV_NAME}; \
181182
echo "Using resource group: $(AZURE_RESOURCE_GROUP)"; \
182183
azd env set AZURE_RESOURCE_GROUP $(AZURE_RESOURCE_GROUP); \
183184
azd down --force --purge --no-prompt; \

0 commit comments

Comments
 (0)