1- name : Deploy-Test-Cleanup (v2) Windows
1+ name : Deploy-Test-Cleanup (v2)
22permissions :
33 contents : read
44 actions : read
55 id-token : write
66on :
7+ workflow_run :
8+ workflows : ["Build Docker and Optional Push"]
9+ types :
10+ - completed
11+ branches :
12+ - main
13+ - dev
14+ - demo
715 workflow_dispatch :
816 inputs :
17+ runner_os :
18+ description : ' Deployment Environment'
19+ required : false
20+ type : choice
21+ options :
22+ - ' codespace'
23+ - ' Local'
24+ default : ' codespace'
925 azure_location :
1026 description : ' Azure Location For Deployment'
1127 required : false
2541 required : false
2642 default : ' '
2743 type : string
28-
2944 waf_enabled :
3045 description : ' Enable WAF'
3146 required : false
4156 required : false
4257 default : false
4358 type : boolean
44-
4559 cleanup_resources :
4660 description : ' Cleanup Deployed Resources'
4761 required : false
4862 default : false
4963 type : boolean
50-
5164 run_e2e_tests :
5265 description : ' Run End-to-End Tests'
5366 required : false
5770 - ' GoldenPath-Testing'
5871 - ' Smoke-Testing'
5972 - ' None'
60-
6173 AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID :
6274 description : ' Log Analytics Workspace ID (Optional)'
6375 required : false
7486 default : ' '
7587 type : string
7688
77- # schedule:
78- # - cron: '0 5,17 * * *' # Runs at 5:00 AM and 5:00 PM GMT
89+ schedule :
90+ - cron : ' 0 5,17 * * *' # Runs at 5:00 AM and 5:00 PM GMT
7991
8092jobs :
8193 validate-inputs :
8294 runs-on : ubuntu-latest
8395 outputs :
8496 validation_passed : ${{ steps.validate.outputs.passed }}
97+ runner_os : ${{ steps.validate.outputs.runner_os }}
8598 azure_location : ${{ steps.validate.outputs.azure_location }}
8699 resource_group_name : ${{ steps.validate.outputs.resource_group_name }}
87100 waf_enabled : ${{ steps.validate.outputs.waf_enabled }}
97110 id : validate
98111 shell : bash
99112 env :
113+ INPUT_RUNNER_OS : ${{ github.event.inputs.runner_os }}
100114 INPUT_AZURE_LOCATION : ${{ github.event.inputs.azure_location }}
101115 INPUT_RESOURCE_GROUP_NAME : ${{ github.event.inputs.resource_group_name }}
102116 INPUT_WAF_ENABLED : ${{ github.event.inputs.waf_enabled }}
@@ -111,6 +125,20 @@ jobs:
111125 echo "🔍 Validating workflow input parameters..."
112126 VALIDATION_FAILED=false
113127
128+ # Validate runner_os (Deployment Environment)
129+ RUNNER_INPUT="${INPUT_RUNNER_OS:-codespace}"
130+ if [[ "$RUNNER_INPUT" == "codespace" ]]; then
131+ RUNNER_OS="ubuntu-latest"
132+ echo "✅ runner_os: '$RUNNER_INPUT' → ubuntu-latest"
133+ elif [[ "$RUNNER_INPUT" == "Local" ]]; then
134+ RUNNER_OS="windows-latest"
135+ echo "✅ runner_os: '$RUNNER_INPUT' → windows-latest"
136+ else
137+ echo "❌ ERROR: runner_os must be 'codespace' or 'Local', got: '$RUNNER_INPUT'"
138+ VALIDATION_FAILED=true
139+ RUNNER_OS="ubuntu-latest"
140+ fi
141+
114142 # Validate azure_location (Azure region format)
115143 LOCATION="${INPUT_AZURE_LOCATION:-australiaeast}"
116144
@@ -233,6 +261,7 @@ jobs:
233261
234262 # Output validated values
235263 echo "passed=true" >> $GITHUB_OUTPUT
264+ echo "runner_os=$RUNNER_OS" >> $GITHUB_OUTPUT
236265 echo "azure_location=$LOCATION" >> $GITHUB_OUTPUT
237266 echo "resource_group_name=$INPUT_RESOURCE_GROUP_NAME" >> $GITHUB_OUTPUT
238267 echo "waf_enabled=$WAF_ENABLED" >> $GITHUB_OUTPUT
@@ -249,7 +278,7 @@ jobs:
249278 if : needs.validate-inputs.outputs.validation_passed == 'true'
250279 uses : ./.github/workflows/deploy-orchestrator.yml
251280 with :
252- runner_os : windows- latest
281+ runner_os : ${{ needs.validate-inputs.outputs.runner_os || 'ubuntu- latest' }}
253282 azure_location : ${{ needs.validate-inputs.outputs.azure_location || 'australiaeast' }}
254283 resource_group_name : ${{ needs.validate-inputs.outputs.resource_group_name || '' }}
255284 waf_enabled : ${{ needs.validate-inputs.outputs.waf_enabled == 'true' }}
0 commit comments