|
34 | 34 | default: false |
35 | 35 | type: boolean |
36 | 36 | AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID: |
37 | | - description: 'Use Only if EXP is Enabled - Enter Azure Log Analytics Workspace ID (leave empty for default value)' |
| 37 | + description: 'Enter Azure Log Analytics Workspace ID (leave empty for default value)' |
38 | 38 | required: false |
39 | 39 | default: '' |
40 | 40 | type: string |
41 | 41 | AZURE_EXISTING_AI_PROJECT_RESOURCE_ID: |
42 | | - description: 'Use Only if EXP is Enabled - Enter Azure AI Project Resource ID (leave empty for default value)' |
| 42 | + description: 'Enter Azure AI Project Resource ID (leave empty for default value)' |
43 | 43 | required: false |
44 | 44 | default: '' |
45 | 45 | type: string |
@@ -100,27 +100,29 @@ jobs: |
100 | 100 | echo "ℹ️ Automatic Trigger: Using Non-WAF + Non-EXP configuration" |
101 | 101 | else |
102 | 102 | echo "ℹ️ Manual Trigger: Using user-specified configuration" |
| 103 | + # Check if EXP was auto-enabled after user input validation |
| 104 | + if [[ "${{ env.EXP }}" == "true" && "${{ github.event.inputs.EXP }}" != "true" ]]; then |
| 105 | + echo "🔧 Note: EXP was automatically enabled due to provided parameter values" |
| 106 | + fi |
103 | 107 | fi |
104 | 108 | echo "🚀 ===================================" |
105 | 109 |
|
106 | | - - name: Validate EXP Configuration |
| 110 | + - name: Validate and Auto-Configure EXP |
107 | 111 | run: | |
108 | 112 | echo "🔍 Validating EXP configuration..." |
109 | 113 | |
110 | 114 | # Check if EXP values were provided but EXP is disabled |
111 | 115 | if [[ "${{ github.event.inputs.EXP }}" != "true" ]]; then |
112 | 116 | if [[ -n "${{ github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}" ]] || [[ -n "${{ github.event.inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}" ]]; then |
113 | | - echo "❌ ERROR: EXP parameter values were provided but EXP is not enabled!" |
| 117 | + echo "🔧 AUTO-ENABLING EXP: EXP parameter values were provided but EXP was not explicitly enabled." |
114 | 118 | echo "" |
115 | 119 | echo "You provided values for:" |
116 | 120 | [[ -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 }}'" |
117 | 121 | [[ -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 }}'" |
118 | 122 | echo "" |
119 | | - echo "✅ To fix this:" |
120 | | - echo " 1. Go back and check the 'Enable EXP' checkbox, OR" |
121 | | - echo " 2. Clear the EXP-related fields if you don't want to use EXP" |
122 | | - echo "" |
123 | | - exit 1 |
| 123 | + echo "✅ Automatically enabling EXP to use these values." |
| 124 | + echo "EXP=true" >> $GITHUB_ENV |
| 125 | + echo "📌 EXP has been automatically enabled for this deployment." |
124 | 126 | fi |
125 | 127 | fi |
126 | 128 | |
@@ -585,7 +587,7 @@ jobs: |
585 | 587 | |
586 | 588 | # Get deployment configuration for notification |
587 | 589 | WAF_STATUS="${{ github.event.inputs.waf_enabled || true }}" |
588 | | - EXP_STATUS="${{ github.event.inputs.EXP || false }}" |
| 590 | + EXP_STATUS="${{ env.EXP || false }}" |
589 | 591 | CLEANUP_STATUS="${{ github.event.inputs.cleanup_resources || true }}" |
590 | 592 |
|
591 | 593 | # Construct the email body |
|
0 commit comments