File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8888 azd env set principalId $principalId
8989 azd env set fabricWorkspaceMode skip
9090 - name : Provision Infrastructure
91+ id : provision-main
92+ continue-on-error : true
9193 run : azd provision --no-prompt
9294 env :
9395 AZD_INITIAL_ENVIRONMENT_CONFIG : ${{ secrets.AZD_INITIAL_ENVIRONMENT_CONFIG }}
96+ timeout-minutes : 60
97+ - name : Re-authenticate and Retry if Failed
98+ if : steps.provision-main.outcome == 'failure'
99+ run : |
100+ echo "::warning::First provision attempt failed. Re-authenticating and retrying..."
101+
102+ # Get fresh OIDC token and re-authenticate
103+ az logout
104+ az login --service-principal \
105+ --username ${{ vars.AZURE_CLIENT_ID }} \
106+ --tenant ${{ vars.AZURE_TENANT_ID }} \
107+ --allow-no-subscriptions \
108+ --federated-token $(curl -sS -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" | jq -r .value)
109+
110+ az account set --subscription ${{ vars.AZURE_SUBSCRIPTION_ID }}
111+
112+ # Retry provision (will skip completed resources)
113+ azd provision --no-prompt
114+ timeout-minutes : 60
You can’t perform that action at this time.
0 commit comments