Skip to content

Commit

Permalink
Merge pull request #154 from bouvet/CI/add-order-to-pr-workflow
Browse files Browse the repository at this point in the history
ci: add order to pr workflow
  • Loading branch information
Jone-Torgersen authored Feb 12, 2025
2 parents 7c3afbd + 29aa1cd commit 65290e8
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/on-closed-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,19 @@ jobs:
- name: Set PR Number
run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV

- name: Remove resources from test environment
- name: Remove container environments (verbose)
run: |
echo "Removing resources for PR #$PR_NUMBER..."
echo "Deleting container environments..."
az resource delete --ids /subscriptions/${{ secrets.AZURE_SUBSCRIPTION }}/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/managedEnvironments/bds-test-containerenv-frontend --subscription ${{ secrets.AZURE_SUBSCRIPTION }} --verbose || true
az resource delete --ids /subscriptions/${{ secrets.AZURE_SUBSCRIPTION }}/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/managedEnvironments/bds-test-containerenv-api --subscription ${{ secrets.AZURE_SUBSCRIPTION }} --verbose || true
- name: Remove remaining resources (verbose)
run: |
echo "Deleting all other resources..."
az resource list --resource-group $RESOURCE_GROUP --query "[].id" --output tsv |
xargs -I {} az resource delete --ids {} --subscription ${{ secrets.AZURE_SUBSCRIPTION }}
xargs -I {} az resource delete --ids {} --subscription ${{ secrets.AZURE_SUBSCRIPTION }} --verbose || true
- name: Remove virtual network (verbose)
run: |
echo "Deleting virtual network..."
az resource delete --ids /subscriptions/${{ secrets.AZURE_SUBSCRIPTION }}/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.Network/virtualNetworks/bds-test-vnet --subscription ${{ secrets.AZURE_SUBSCRIPTION }} --verbose || true

0 comments on commit 65290e8

Please sign in to comment.