Skip to content

Commit f62a140

Browse files
Added runner_os input (Deployment Environment) and Deleted deploy-windows.yml since it's no longer needed
1 parent f2bf189 commit f62a140

2 files changed

Lines changed: 27 additions & 275 deletions

File tree

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy-Test-Cleanup (v2) Linux
1+
name: Deploy-Test-Cleanup (v2)
22

33
permissions:
44
id-token: write
@@ -15,6 +15,14 @@ on:
1515
- hotfix
1616
workflow_dispatch:
1717
inputs:
18+
runner_os:
19+
description: 'Deployment Environment'
20+
required: false
21+
type: choice
22+
options:
23+
- 'codespace'
24+
- 'Local'
25+
default: 'codespace'
1826
azure_location:
1927
description: 'Azure Location For Deployment'
2028
required: false
@@ -91,6 +99,7 @@ jobs:
9199
runs-on: ubuntu-latest
92100
outputs:
93101
validation_passed: ${{ steps.validate.outputs.passed }}
102+
runner_os: ${{ steps.validate.outputs.runner_os }}
94103
azure_location: ${{ steps.validate.outputs.azure_location }}
95104
resource_group_name: ${{ steps.validate.outputs.resource_group_name }}
96105
waf_enabled: ${{ steps.validate.outputs.waf_enabled }}
@@ -106,6 +115,7 @@ jobs:
106115
id: validate
107116
shell: bash
108117
env:
118+
INPUT_RUNNER_OS: ${{ github.event.inputs.runner_os }}
109119
INPUT_AZURE_LOCATION: ${{ github.event.inputs.azure_location }}
110120
INPUT_RESOURCE_GROUP_NAME: ${{ github.event.inputs.resource_group_name }}
111121
INPUT_WAF_ENABLED: ${{ github.event.inputs.waf_enabled }}
@@ -119,6 +129,20 @@ jobs:
119129
run: |
120130
echo "🔍 Validating workflow input parameters..."
121131
VALIDATION_FAILED=false
132+
133+
# Resolve runner_os from Deployment Environment selection
134+
DEPLOY_ENV="${INPUT_RUNNER_OS:-codespace}"
135+
if [[ "$DEPLOY_ENV" == "codespace" ]]; then
136+
RUNNER_OS="ubuntu-latest"
137+
echo "✅ Deployment Environment: 'codespace' → runner: ubuntu-latest"
138+
elif [[ "$DEPLOY_ENV" == "Local" ]]; then
139+
RUNNER_OS="windows-latest"
140+
echo "✅ Deployment Environment: 'Local' → runner: windows-latest"
141+
else
142+
echo "❌ ERROR: Deployment Environment must be 'codespace' or 'Local', got: '$DEPLOY_ENV'"
143+
VALIDATION_FAILED=true
144+
RUNNER_OS="ubuntu-latest"
145+
fi
122146
123147
# Validate azure_location (Azure region format)
124148
LOCATION="${INPUT_AZURE_LOCATION:-australiaeast}"
@@ -242,6 +266,7 @@ jobs:
242266
243267
# Output validated values
244268
echo "passed=true" >> $GITHUB_OUTPUT
269+
echo "runner_os=$RUNNER_OS" >> $GITHUB_OUTPUT
245270
echo "azure_location=$LOCATION" >> $GITHUB_OUTPUT
246271
echo "resource_group_name=$INPUT_RESOURCE_GROUP_NAME" >> $GITHUB_OUTPUT
247272
echo "waf_enabled=$WAF_ENABLED" >> $GITHUB_OUTPUT
@@ -258,7 +283,7 @@ jobs:
258283
if: needs.validate-inputs.outputs.validation_passed == 'true'
259284
uses: ./.github/workflows/deploy-orchestrator.yml
260285
with:
261-
runner_os: ubuntu-latest
286+
runner_os: ${{ needs.validate-inputs.outputs.runner_os || 'ubuntu-latest' }}
262287
azure_location: ${{ needs.validate-inputs.outputs.azure_location || 'australiaeast' }}
263288
resource_group_name: ${{ needs.validate-inputs.outputs.resource_group_name || '' }}
264289
waf_enabled: ${{ needs.validate-inputs.outputs.waf_enabled == 'true' }}

.github/workflows/deploy-windows.yml

Lines changed: 0 additions & 273 deletions
This file was deleted.

0 commit comments

Comments
 (0)