Skip to content

Commit 87357f0

Browse files
fix: refine App Service name retrieval to filter by 'app-' prefix
1 parent a2625fd commit 87357f0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/import-sample-data-cosmosdb.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ jobs:
218218
env:
219219
RESOURCE_GROUP_NAME: ${{ inputs.RESOURCE_GROUP_NAME }}
220220
run: |
221-
APP_SERVICE_NAME=$(az webapp list --resource-group "$RESOURCE_GROUP_NAME" -o json | jq -r '.[0].name')
221+
APP_SERVICE_NAME=$(az webapp list --resource-group "$RESOURCE_GROUP_NAME" -o json | jq -r '[.[] | select(.name | startswith("app-"))] | .[0].name')
222222
if [ -z "$APP_SERVICE_NAME" ] || [ "$APP_SERVICE_NAME" == "null" ]; then
223-
echo "❌ No App Service found in '$RESOURCE_GROUP_NAME'."
223+
echo "❌ No App Service with 'app-' prefix found in '$RESOURCE_GROUP_NAME'."
224224
exit 1
225225
fi
226226
echo "✅ App Service: $APP_SERVICE_NAME"

0 commit comments

Comments
 (0)