File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9595 AZD_INITIAL_ENVIRONMENT_CONFIG : ${{ secrets.AZD_INITIAL_ENVIRONMENT_CONFIG }}
9696 fabricWorkspaceMode : ' none'
9797 timeout-minutes : 60
98- - name : Re-authenticate and Retry if Failed
99- if : steps.provision-main.outcome == 'failure'
100- run : |
101- echo "::warning::First provision attempt failed. Re-authenticating and retrying..."
102-
103- # Get fresh OIDC token and re-authenticate
104- az logout
105- az login --service-principal \
106- --username ${{ vars.AZURE_CLIENT_ID }} \
107- --tenant ${{ vars.AZURE_TENANT_ID }} \
108- --allow-no-subscriptions \
109- --federated-token $(curl -sS -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" | jq -r .value)
110-
111- az account set --subscription ${{ vars.AZURE_SUBSCRIPTION_ID }}
112-
113- # Wait for resource group deletion to complete if in progress
114- echo "Checking resource group status..."
115- for i in {1..30}; do
116- RG_STATE=$(az group show --name "$RESOURCE_GROUP" --query "properties.provisioningState" -o tsv 2>/dev/null || echo "NotFound")
117-
118- if [ "$RG_STATE" = "NotFound" ]; then
119- echo "Resource group fully deleted. Recreating..."
120- az group create --name "$RESOURCE_GROUP" --location ${{ vars.AZURE_LOCATION }}
121- break
122- elif [ "$RG_STATE" = "Succeeded" ]; then
123- echo "Resource group ready"
124- break
125- else
126- echo "Resource group in state: $RG_STATE. Waiting 10s... (attempt $i/30)"
127- sleep 10
128- fi
129- done
130-
131- # Retry provision (will skip completed resources)
132- azd provision --no-prompt
133- env :
134- fabricWorkspaceMode : ' none'
135- timeout-minutes : 60
You can’t perform that action at this time.
0 commit comments