Skip to content

Commit aaf5167

Browse files
feat: Enhance infrastructure provisioning with retry mechanism and fresh authentication token
1 parent 517abd6 commit aaf5167

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/azure-dev.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,23 @@ jobs:
8787
8888
echo "Power BI API permissions configured"
8989
- name: Provision Infrastructure
90+
id: provision
91+
continue-on-error: true
9092
run: azd provision --no-prompt
9193
env:
9294
AZD_INITIAL_ENVIRONMENT_CONFIG: ${{ secrets.AZD_INITIAL_ENVIRONMENT_CONFIG }}
9395
principalType: 'ServicePrincipal'
96+
- name: Re-authenticate for Retry
97+
if: steps.provision.outcome == 'failure'
98+
uses: azure/login@v2
99+
with:
100+
client-id: ${{ vars.AZURE_CLIENT_ID }}
101+
tenant-id: ${{ vars.AZURE_TENANT_ID }}
102+
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
103+
- name: Retry Failed Hooks with Fresh Token
104+
if: steps.provision.outcome == 'failure'
105+
run: |
106+
echo "Retrying with fresh authentication token..."
107+
azd provision --no-prompt
108+
env:
109+
principalType: 'ServicePrincipal'

0 commit comments

Comments
 (0)