Skip to content

Commit 30223e7

Browse files
deploy failed fix
1 parent 4c72c25 commit 30223e7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,19 @@ jobs:
165165
echo "Fetching deployment output..."
166166
BICEP_OUTPUT=$(az deployment group show --name ${{ env.SOLUTION_PREFIX }}-deployment --resource-group ${{ env.RESOURCE_GROUP_NAME }} --query "properties.outputs" -o json)
167167
echo "Extracting deployment output..."
168-
WEBAPP_URL=$(echo "$BICEP_OUTPUT" | jq -r '.WEB_APP_URL.value')
168+
echo "Available output keys:"
169+
echo "$BICEP_OUTPUT" | jq -r 'keys | join(", ")'
170+
# Case-insensitive lookup for WEB_APP_URL because deployment outputs returned inconsistent casing previously
171+
WEBAPP_URL=$(echo "$BICEP_OUTPUT" | jq -r 'to_entries | map(select((.key|ascii_upcase)=="WEB_APP_URL")) | .[0].value.value // empty')
169172
if [ -z "$WEBAPP_URL" ] || [ "$WEBAPP_URL" = "null" ]; then
170-
echo "WEB_APP_URL not found in deployment outputs" >&2
171-
echo "Full outputs: $BICEP_OUTPUT" >&2
173+
echo "WEB_APP_URL not found in deployment outputs (case-insensitive scan)" >&2
174+
echo "Full outputs JSON follows for troubleshooting:" >&2
175+
echo "$BICEP_OUTPUT" >&2
172176
exit 1
173177
fi
178+
echo "Resolved WEBAPP_URL: $WEBAPP_URL"
174179
echo "WEBAPP_URL=$WEBAPP_URL" >> $GITHUB_OUTPUT
175-
echo "Deployment output (truncated for log clarity):"
180+
echo "Deployment outputs (truncated):"
176181
echo "$BICEP_OUTPUT" | head -c 2000
177182
178183
- name: Logout from Azure

0 commit comments

Comments
 (0)