Skip to content

Commit 478f053

Browse files
Merge pull request microsoft#78 from microsoft/fix/dynamic-region-list-macae
fix: quota check script with dynamic region handling
2 parents 8502784 + 094b0de commit 478f053

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
export AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }}
2323
export AZURE_SUBSCRIPTION_ID="${{ secrets.AZURE_SUBSCRIPTION_ID }}"
2424
export GPT_MIN_CAPACITY="50"
25+
export AZURE_REGIONS="${{ vars.AZURE_REGIONS }}"
2526
2627
chmod +x deploy/scripts/checkquota.sh
2728
if ! deploy/scripts/checkquota.sh; then

deploy/scripts/checkquota.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# List of Azure regions to check for quota (update as needed)
4-
REGIONS=("eastus" "westus" "northcentralus" "uksouth" "swedencentral")
4+
IFS=', ' read -ra REGIONS <<< "$AZURE_REGIONS"
55

66
SUBSCRIPTION_ID="${AZURE_SUBSCRIPTION_ID}"
77
GPT_MIN_CAPACITY="${GPT_MIN_CAPACITY}"
@@ -17,7 +17,7 @@ if ! az login --service-principal -u "$AZURE_CLIENT_ID" -p "$AZURE_CLIENT_SECRET
1717
fi
1818

1919
echo "🔄 Validating required environment variables..."
20-
if [[ -z "$SUBSCRIPTION_ID" || -z "$GPT_MIN_CAPACITY" ]]; then
20+
if [[ -z "$SUBSCRIPTION_ID" || -z "$GPT_MIN_CAPACITY" || -z "$REGIONS" ]]; then
2121
echo "❌ ERROR: Missing required environment variables."
2222
exit 1
2323
fi

0 commit comments

Comments
 (0)