You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/deploy.yml
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -126,13 +126,17 @@ jobs:
126
126
IMAGE_TAG="latest"
127
127
fi
128
128
129
+
# Prefer quota-selected region if available
130
+
EFFECTIVE_AI_REGION="${VALID_REGION:-eastus}"
131
+
echo "Using AI Deployments Region: $EFFECTIVE_AI_REGION"
132
+
129
133
az deployment group create \
130
134
--name ${{ env.SOLUTION_PREFIX }}-deployment \
131
135
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
132
136
--template-file infra/main.bicep \
133
137
--parameters \
134
138
solutionName="${{ env.SOLUTION_PREFIX }}" \
135
-
aiDeploymentsLocation="eastus" \
139
+
aiDeploymentsLocation="$EFFECTIVE_AI_REGION" \
136
140
useWafAlignedArchitecture=false \
137
141
capacity=${{ env.GPT_MIN_CAPACITY }} \
138
142
imageVersion="${IMAGE_TAG}" \
@@ -356,7 +360,7 @@ jobs:
356
360
357
361
# Purge OpenAI Resource
358
362
echo "Purging the OpenAI Resource..."
359
-
if ! az resource delete --ids /subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/providers/Microsoft.CognitiveServices/locations/northcentralus/resourceGroups/${{ env.RESOURCE_GROUP_NAME }}/deletedAccounts/${{ env.OPENAI_RESOURCE_NAME }} --verbose; then
363
+
if ! az resource delete --ids /subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/providers/Microsoft.CognitiveServices/locations/${{ env.VALID_REGION || 'eastus' }}/resourceGroups/${{ env.RESOURCE_GROUP_NAME }}/deletedAccounts/${{ env.OPENAI_RESOURCE_NAME }} --verbose; then
360
364
echo "Failed to purge openai resource: ${{ env.OPENAI_RESOURCE_NAME }}"
361
365
else
362
366
echo "Purged the openai resource: ${{ env.OPENAI_RESOURCE_NAME }}"
0 commit comments