Skip to content

Commit 75dbe69

Browse files
Added Input paramter to select Codespace/Local deployment
1 parent d764d52 commit 75dbe69

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed
Lines changed: 22 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
on:
33
push:
44
branches:
@@ -22,6 +22,14 @@ on:
2222
- '.github/workflows/deploy-linux.yml'
2323
workflow_dispatch:
2424
inputs:
25+
runner_os:
26+
description: 'Deployment Environment'
27+
required: false
28+
type: choice
29+
options:
30+
- 'codespace'
31+
- 'Local'
32+
default: 'codespace'
2533
azure_location:
2634
description: 'Azure Location For Deployment'
2735
required: false
@@ -111,11 +119,13 @@ jobs:
111119
azure_env_log_analytics_workspace_id: ${{ steps.validate.outputs.azure_env_log_analytics_workspace_id }}
112120
azure_existing_ai_project_resource_id: ${{ steps.validate.outputs.azure_existing_ai_project_resource_id }}
113121
existing_webapp_url: ${{ steps.validate.outputs.existing_webapp_url }}
122+
runner_os: ${{ steps.validate.outputs.runner_os }}
114123
steps:
115124
- name: Validate Workflow Input Parameters
116125
id: validate
117126
shell: bash
118127
env:
128+
INPUT_RUNNER_OS: ${{ github.event.inputs.runner_os }}
119129
INPUT_AZURE_LOCATION: ${{ github.event.inputs.azure_location }}
120130
INPUT_RESOURCE_GROUP_NAME: ${{ github.event.inputs.resource_group_name }}
121131
INPUT_WAF_ENABLED: ${{ github.event.inputs.waf_enabled }}
@@ -130,6 +140,15 @@ jobs:
130140
echo "🔍 Validating workflow input parameters..."
131141
VALIDATION_FAILED=false
132142
143+
# Derive actual runner from runner_os input
144+
RUNNER_OS_INPUT="${INPUT_RUNNER_OS:-codespace}"
145+
if [[ "$RUNNER_OS_INPUT" == "codespace" ]]; then
146+
RUNNER_OS="ubuntu-latest"
147+
else
148+
RUNNER_OS="windows-latest"
149+
fi
150+
echo "✅ runner_os derived as: '$RUNNER_OS'"
151+
133152
# Validate azure_location (Azure region format)
134153
LOCATION="${INPUT_AZURE_LOCATION:-australiaeast}"
135154
@@ -252,6 +271,7 @@ jobs:
252271
253272
# Output validated values
254273
echo "passed=true" >> $GITHUB_OUTPUT
274+
echo "runner_os=$RUNNER_OS" >> $GITHUB_OUTPUT
255275
echo "azure_location=$LOCATION" >> $GITHUB_OUTPUT
256276
echo "resource_group_name=$INPUT_RESOURCE_GROUP_NAME" >> $GITHUB_OUTPUT
257277
echo "waf_enabled=$WAF_ENABLED" >> $GITHUB_OUTPUT
@@ -268,7 +288,7 @@ jobs:
268288
if: needs.validate-inputs.outputs.validation_passed == 'true'
269289
uses: ./.github/workflows/deploy-orchestrator.yml
270290
with:
271-
runner_os: ubuntu-latest
291+
runner_os: ${{ needs.validate-inputs.outputs.runner_os || 'ubuntu-latest' }}
272292
azure_location: ${{ needs.validate-inputs.outputs.azure_location || 'australiaeast' }}
273293
resource_group_name: ${{ needs.validate-inputs.outputs.resource_group_name || '' }}
274294
waf_enabled: ${{ needs.validate-inputs.outputs.waf_enabled == 'true' }}

0 commit comments

Comments
 (0)