You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "❌ ERROR: RESOURCE_GROUP_NAME '$INPUT_RESOURCE_GROUP_NAME' is invalid. Must contain only alphanumerics, periods, underscores, hyphens, and parentheses. Cannot end with period."
119
+
VALIDATION_FAILED=true
120
+
elif [[ ${#INPUT_RESOURCE_GROUP_NAME} -gt 90 ]]; then
echo "✅ RESOURCE_GROUP_NAME: '$INPUT_RESOURCE_GROUP_NAME' is valid"
125
+
fi
126
+
127
+
# Validate AZURE_LOCATION (required, Azure region format)
128
+
if [[ -z "$INPUT_AZURE_LOCATION" ]]; then
129
+
echo "❌ ERROR: AZURE_LOCATION is required but was not provided"
130
+
VALIDATION_FAILED=true
131
+
elif [[ ! "$INPUT_AZURE_LOCATION" =~ ^[a-z0-9]+$ ]]; then
132
+
echo "❌ ERROR: AZURE_LOCATION '$INPUT_AZURE_LOCATION' is invalid. Must contain only lowercase letters and numbers (e.g., 'australiaeast', 'westus2')"
133
+
VALIDATION_FAILED=true
134
+
else
135
+
echo "✅ AZURE_LOCATION: '$INPUT_AZURE_LOCATION' is valid"
136
+
fi
137
+
138
+
# Validate AZURE_ENV_OPENAI_LOCATION (required, Azure region format)
139
+
if [[ -z "$INPUT_AZURE_ENV_OPENAI_LOCATION" ]]; then
140
+
echo "❌ ERROR: AZURE_ENV_OPENAI_LOCATION is required but was not provided"
141
+
VALIDATION_FAILED=true
142
+
elif [[ ! "$INPUT_AZURE_ENV_OPENAI_LOCATION" =~ ^[a-z0-9]+$ ]]; then
143
+
echo "❌ ERROR: AZURE_ENV_OPENAI_LOCATION '$INPUT_AZURE_ENV_OPENAI_LOCATION' is invalid. Must contain only lowercase letters and numbers (e.g., 'australiaeast', 'westus2')"
144
+
VALIDATION_FAILED=true
145
+
else
146
+
echo "✅ AZURE_ENV_OPENAI_LOCATION: '$INPUT_AZURE_ENV_OPENAI_LOCATION' is valid"
147
+
fi
148
+
149
+
# Validate ENV_NAME (required)
150
+
if [[ -z "$INPUT_ENV_NAME" ]]; then
151
+
echo "❌ ERROR: ENV_NAME is required but was not provided"
152
+
VALIDATION_FAILED=true
153
+
else
154
+
echo "✅ ENV_NAME: '$INPUT_ENV_NAME' is valid"
155
+
fi
156
+
157
+
# Validate IMAGE_TAG (required, Docker tag pattern)
158
+
if [[ -z "$INPUT_IMAGE_TAG" ]]; then
159
+
echo "❌ ERROR: IMAGE_TAG is required but was not provided"
160
+
VALIDATION_FAILED=true
161
+
elif [[ ! "$INPUT_IMAGE_TAG" =~ ^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}$ ]]; then
162
+
echo "❌ ERROR: IMAGE_TAG '$INPUT_IMAGE_TAG' is invalid. Must:"
163
+
echo " - Start with alphanumeric or underscore"
164
+
echo " - Contain only alphanumerics, underscores, periods, hyphens"
165
+
echo " - Be max 128 characters"
166
+
VALIDATION_FAILED=true
167
+
else
168
+
echo "✅ IMAGE_TAG: '$INPUT_IMAGE_TAG' is valid"
169
+
fi
170
+
171
+
# Fail workflow if any validation failed
172
+
if [[ "$VALIDATION_FAILED" == "true" ]]; then
173
+
echo ""
174
+
echo "❌ Parameter validation failed. Please correct the errors above and try again."
175
+
exit 1
176
+
fi
177
+
178
+
echo ""
179
+
echo "✅ All input parameters validated successfully!"
0 commit comments