Skip to content

Commit 8859618

Browse files
Add AZURE_SUBSCRIPTION_ID environment variable to post-deployment script and update sample data processing script to handle subscription ID retrieval
1 parent e09acd6 commit 8859618

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ jobs:
184184
185185
- name: Run Post-Deployment Script
186186
id: post_deploy
187+
env:
188+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
187189
run: |
188190
set -e
189191
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"

infra/scripts/process_sample_data.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ if [ -z "$aif_resource_id" ]; then
271271
aif_resource_id=$(azd env get-value AI_FOUNDRY_RESOURCE_ID)
272272
fi
273273

274-
azSubscriptionId=$(azd env get-value AZURE_SUBSCRIPTION_ID)
274+
# Get subscription id from azd env or from environment variable
275+
276+
azSubscriptionId=$(azd env get-value AZURE_SUBSCRIPTION_ID) || azSubscriptionId="$AZURE_SUBSCRIPTION_ID"
275277

276278
# Check if all required arguments are provided
277279
if [ -z "$storageAccount" ] || [ -z "$fileSystem" ] || [ -z "$keyvaultName" ] || [ -z "$cosmosDbAccountName" ] || [ -z "$resourceGroupName" ] || [ -z "$aif_resource_id" ] || [ -z "$aiSearchName" ]; then

0 commit comments

Comments
 (0)