@@ -2,36 +2,37 @@ name: Deploy-Test-Cleanup (Parameterized)
22on :
33 workflow_dispatch :
44 inputs :
5+ run_e2e_tests :
6+ description : ' Run end-to-end tests'
7+ required : false
8+ default : true
9+ type : boolean
10+ cleanup_resources :
11+ description : ' Cleanup deployed resources'
12+ required : false
13+ default : false
14+ type : boolean
515 waf_enabled :
616 description : ' Enable WAF'
717 required : false
818 default : false
919 type : boolean
1020 EXP :
11- description : ' Enable EXP'
21+ description : ' Enable EXP (Required for below fields) '
1222 required : false
1323 default : false
1424 type : boolean
1525 AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID :
16- description : ' [ EXP Only] Azure Log Analytics Workspace ID (leave empty for default from secrets )'
26+ description : ' ⚠️ ONLY if EXP enabled - Enter Azure Log Analytics Workspace ID (leave empty for default value )'
1727 required : false
1828 default : ' '
1929 type : string
2030 AZURE_EXISTING_AI_PROJECT_RESOURCE_ID :
21- description : ' [ EXP Only] Azure AI Project Resource ID (leave empty for default from secrets )'
31+ description : ' ⚠️ ONLY if EXP enabled - Enter Azure AI Project Resource ID (leave empty for default value )'
2232 required : false
2333 default : ' '
2434 type : string
25- run_e2e_tests :
26- description : ' Run end-to-end tests'
27- required : false
28- default : true
29- type : boolean
30- cleanup_resources :
31- description : ' Cleanup deployed resources'
32- required : false
33- default : false
34- type : boolean
35+
3536
3637
3738env :
6263 CLEANUP_RESOURCES : ${{ github.event.inputs.cleanup_resources || true }}
6364
6465 steps :
66+ - name : Validate EXP Configuration
67+ run : |
68+ echo "🔍 Validating EXP configuration..."
69+
70+ # Check if EXP values were provided but EXP is disabled
71+ if [[ "${{ github.event.inputs.EXP }}" != "true" ]]; then
72+ if [[ -n "${{ github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}" ]] || [[ -n "${{ github.event.inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}" ]]; then
73+ echo "❌ ERROR: EXP parameter values were provided but EXP is not enabled!"
74+ echo ""
75+ echo "You provided values for:"
76+ [[ -n "${{ github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}" ]] && echo " - Azure Log Analytics Workspace ID: '${{ github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}'"
77+ [[ -n "${{ github.event.inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}" ]] && echo " - Azure AI Project Resource ID: '${{ github.event.inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}'"
78+ echo ""
79+ echo "✅ To fix this:"
80+ echo " 1. Go back and check the 'Enable EXP' checkbox, OR"
81+ echo " 2. Clear the EXP-related fields if you don't want to use EXP"
82+ echo ""
83+ exit 1
84+ fi
85+ fi
86+
87+ echo "✅ EXP configuration is valid"
88+
6589 - name : Checkout Code
6690 uses : actions/checkout@v4
6791
0 commit comments