@@ -34,71 +34,10 @@ jobs:
3434 environment : production
3535 steps :
3636 - name : Checkout Code
37- uses : actions/checkout@v6
37+ uses : actions/checkout@v4
3838
3939 - name : Login to Azure for Sample Data Download
40- uses : azure/login@v3
41- with :
42- client-id : ${{ secrets.AZURE_CLIENT_ID }}
43- tenant-id : ${{ secrets.AZURE_TENANT_ID }}
44- subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
45-
46- - name : Enable Public Access on Sample Data Storage (if disabled)
47- id : sample_storage_access
48- shell : bash
49- env :
50- STORAGE_ACCOUNT_NAME : ${{ vars.SAMPLE_DATA_STORAGE_ACCOUNT_NAME }}
51- run : |
52- echo "🔍 Checking public network access on sample data storage account '${STORAGE_ACCOUNT_NAME}'..."
53-
54- # Discover the resource group for the sample data storage account
55- SAMPLE_STORAGE_RG=$(az storage account list --query "[?name=='${STORAGE_ACCOUNT_NAME}'].resourceGroup | [0]" -o tsv)
56- if [ -z "$SAMPLE_STORAGE_RG" ] || [ "$SAMPLE_STORAGE_RG" == "null" ]; then
57- echo "❌ Could not find resource group for storage account '${STORAGE_ACCOUNT_NAME}'."
58- exit 1
59- fi
60- echo "SAMPLE_STORAGE_RG=$SAMPLE_STORAGE_RG" >> $GITHUB_ENV
61-
62- CURRENT_ACCESS=$(az storage account show --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --query "publicNetworkAccess" -o tsv)
63- CURRENT_DEFAULT_ACTION=$(az storage account show --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --query "networkRuleSet.defaultAction" -o tsv)
64-
65- echo " Current publicNetworkAccess: $CURRENT_ACCESS"
66- echo " Current defaultAction: $CURRENT_DEFAULT_ACTION"
67-
68- if [ "$CURRENT_ACCESS" == "Disabled" ] || [ "$CURRENT_DEFAULT_ACTION" == "Deny" ]; then
69- echo "🔓 Enabling public access on sample data storage account..."
70- az storage account update --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --public-network-access Enabled --output none
71- az storage account update --name "$STORAGE_ACCOUNT_NAME" --resource-group "$SAMPLE_STORAGE_RG" --default-action Allow --output none
72-
73- echo "⏳ Waiting 30 seconds for network changes to propagate..."
74- sleep 30
75- echo "✅ Public access enabled on sample data storage account."
76- else
77- echo "✅ Public access is already enabled."
78- fi
79-
80- - name : Download Sample Data from Azure Storage
81- shell : bash
82- env :
83- STORAGE_ACCOUNT_NAME : ${{ vars.SAMPLE_DATA_STORAGE_ACCOUNT_NAME }}
84- STORAGE_CONTAINER_NAME : ${{ vars.SAMPLE_DATA_STORAGE_CONTAINER_NAME }}
85- run : |
86- SAMPLE_DATA_DIR="${RUNNER_TEMP}/sample-data"
87- mkdir -p "$SAMPLE_DATA_DIR"
88-
89- echo "📥 Downloading sample data file from storage account '${STORAGE_ACCOUNT_NAME}'..."
90- az storage blob download \
91- --account-name "$STORAGE_ACCOUNT_NAME" \
92- --container-name "$STORAGE_CONTAINER_NAME" \
93- --name "exported_data_vector_score.csv" \
94- --file "$SAMPLE_DATA_DIR/exported_data_vector_score.csv" \
95- --auth-mode login
96-
97- echo "SAMPLE_DATA_DIR=$SAMPLE_DATA_DIR" >> $GITHUB_ENV
98- echo "✅ Sample data file downloaded to $SAMPLE_DATA_DIR"
99-
100- - name : Login to Azure for Sample Data Download
101- uses : azure/login@v3
40+ uses : azure/login@v2
10241 with :
10342 client-id : ${{ secrets.AZURE_CLIENT_ID }}
10443 tenant-id : ${{ secrets.AZURE_TENANT_ID }}
@@ -200,15 +139,10 @@ jobs:
200139 echo "✅ All input parameters validated successfully!"
201140
202141 - name : Setup Python
203- uses : actions/setup-python@v6
142+ uses : actions/setup-python@v5
204143 with :
205144 python-version : ' 3.11'
206145
207- - name : Upgrade Azure CLI and install extensions
208- run : |
209- az upgrade --yes --all
210- az extension add --name rdbms-connect --upgrade --yes || true
211-
212146 - name : Discover PostgreSQL Server from Resource Group
213147 env :
214148 INPUT_RESOURCE_GROUP_NAME : ${{ inputs.RESOURCE_GROUP_NAME }}
0 commit comments