1- name : Deploy-Test-Cleanup (v2) Linux
1+ name : Deploy-Test-Cleanup (v2)
22permissions :
33 contents : read
44 actions : read
5+ id-token : write
56on :
67 workflow_run :
78 workflows : ["Build Docker and Optional Push"]
1314 - demo
1415 workflow_dispatch :
1516 inputs :
17+ runner_os :
18+ description : ' Deployment Environment'
19+ required : false
20+ type : choice
21+ options :
22+ - ' codespace'
23+ - ' Local'
24+ default : ' codespace'
1625 azure_location :
1726 description : ' Azure Location For Deployment'
1827 required : false
8594 runs-on : ubuntu-latest
8695 outputs :
8796 validation_passed : ${{ steps.validate.outputs.passed }}
97+ runner_os : ${{ steps.validate.outputs.runner_os }}
8898 azure_location : ${{ steps.validate.outputs.azure_location }}
8999 resource_group_name : ${{ steps.validate.outputs.resource_group_name }}
90100 waf_enabled : ${{ steps.validate.outputs.waf_enabled }}
@@ -100,6 +110,7 @@ jobs:
100110 id : validate
101111 shell : bash
102112 env :
113+ INPUT_RUNNER_OS : ${{ github.event.inputs.runner_os }}
103114 INPUT_AZURE_LOCATION : ${{ github.event.inputs.azure_location }}
104115 INPUT_RESOURCE_GROUP_NAME : ${{ github.event.inputs.resource_group_name }}
105116 INPUT_WAF_ENABLED : ${{ github.event.inputs.waf_enabled }}
@@ -114,6 +125,20 @@ jobs:
114125 echo "🔍 Validating workflow input parameters..."
115126 VALIDATION_FAILED=false
116127
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+
117142 # Validate azure_location (Azure region format)
118143 LOCATION="${INPUT_AZURE_LOCATION:-australiaeast}"
119144
@@ -236,6 +261,7 @@ jobs:
236261
237262 # Output validated values
238263 echo "passed=true" >> $GITHUB_OUTPUT
264+ echo "runner_os=$RUNNER_OS" >> $GITHUB_OUTPUT
239265 echo "azure_location=$LOCATION" >> $GITHUB_OUTPUT
240266 echo "resource_group_name=$INPUT_RESOURCE_GROUP_NAME" >> $GITHUB_OUTPUT
241267 echo "waf_enabled=$WAF_ENABLED" >> $GITHUB_OUTPUT
@@ -252,7 +278,7 @@ jobs:
252278 if : needs.validate-inputs.outputs.validation_passed == 'true'
253279 uses : ./.github/workflows/deploy-orchestrator.yml
254280 with :
255- runner_os : ubuntu-latest
281+ runner_os : ${{ needs.validate-inputs.outputs.runner_os || ' ubuntu-latest' }}
256282 azure_location : ${{ needs.validate-inputs.outputs.azure_location || 'australiaeast' }}
257283 resource_group_name : ${{ needs.validate-inputs.outputs.resource_group_name || '' }}
258284 waf_enabled : ${{ needs.validate-inputs.outputs.waf_enabled == 'true' }}
0 commit comments