File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,13 +53,14 @@ jobs:
5353 - name : Provision and Deploy
5454 shell : bash
5555 run : |
56- if ! azd env select "$AZURE_ENV_NAME"; then
57- azd env new "$AZURE_ENV_NAME" --subscription "$AZURE_SUBSCRIPTION_ID" --location "$AZURE_LOCATION" --no-prompt
58- fi
56+ # Always create the environment (idempotent — succeeds even if it exists)
57+ azd env new "$AZURE_ENV_NAME" --subscription "$AZURE_SUBSCRIPTION_ID" --location "$AZURE_LOCATION" --no-prompt || true
58+ azd env select "$AZURE_ENV_NAME"
5959
6060 azd config set defaults.subscription "$AZURE_SUBSCRIPTION_ID"
6161
62-
62+ # Write required env values
63+ azd env set AZURE_ENV_AI_SERVICE_LOCATION "${AZURE_ENV_AI_SERVICE_LOCATION:-$AZURE_LOCATION}"
6364
6465 if [[ -n "${AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID:-}" ]]; then
6566 azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID "$AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID"
You can’t perform that action at this time.
0 commit comments