Skip to content

Commit 2f92a3c

Browse files
combined Ubuntu & Windows workflows into a single pipeline
1 parent 812d6ae commit 2f92a3c

2 files changed

Lines changed: 28 additions & 286 deletions

File tree

Lines changed: 28 additions & 3 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
pull_request:
44
branches:
@@ -21,6 +21,15 @@ on:
2121
- '.github/workflows/deploy-*.yml'
2222
workflow_dispatch:
2323
inputs:
24+
runner_os:
25+
description: 'Deployment Environment'
26+
required: false
27+
type: choice
28+
options:
29+
- 'codespace'
30+
- 'Local'
31+
default: 'codespace'
32+
2433
azure_location:
2534
description: 'Azure Location For Deployment'
2635
required: false
@@ -93,7 +102,6 @@ on:
93102
required: false
94103
default: ''
95104
type: string
96-
97105

98106
permissions:
99107
contents: read
@@ -116,6 +124,7 @@ jobs:
116124
azure_existing_ai_project_resource_id: ${{ steps.validate.outputs.azure_existing_ai_project_resource_id }}
117125
existing_webapp_url: ${{ steps.validate.outputs.existing_webapp_url }}
118126
azure_env_use_case: ${{ steps.validate.outputs.azure_env_use_case }}
127+
runner_os: ${{ steps.validate.outputs.runner_os }}
119128

120129
steps:
121130
- name: Validate Workflow Input Parameters
@@ -133,10 +142,25 @@ jobs:
133142
INPUT_AZURE_EXISTING_AI_PROJECT_RESOURCE_ID: ${{ github.event.inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}
134143
INPUT_EXISTING_WEBAPP_URL: ${{ github.event.inputs.existing_webapp_url }}
135144
INPUT_AZURE_ENV_USE_CASE: ${{ github.event.inputs.AZURE_ENV_USE_CASE }}
145+
INPUT_RUNNER_OS: ${{ github.event.inputs.runner_os }}
136146

137147
run: |
138148
echo "🔍 Validating workflow input parameters..."
139149
VALIDATION_FAILED=false
150+
151+
# Resolve runner_os from Deployment Environment selection
152+
DEPLOY_ENV="${INPUT_RUNNER_OS:-codespace}"
153+
if [[ "$DEPLOY_ENV" == "codespace" ]]; then
154+
RUNNER_OS="ubuntu-latest"
155+
echo "✅ Deployment Environment: 'codespace' → runner: ubuntu-latest"
156+
elif [[ "$DEPLOY_ENV" == "Local" ]]; then
157+
RUNNER_OS="windows-latest"
158+
echo "✅ Deployment Environment: 'Local' → runner: windows-latest"
159+
else
160+
echo "❌ ERROR: Deployment Environment must be 'codespace' or 'Local', got: '$DEPLOY_ENV'"
161+
VALIDATION_FAILED=true
162+
RUNNER_OS="ubuntu-latest"
163+
fi
140164
141165
# Validate azure_location (Azure region format)
142166
LOCATION="${INPUT_AZURE_LOCATION:-australiaeast}"
@@ -280,14 +304,15 @@ jobs:
280304
echo "azure_existing_ai_project_resource_id=$INPUT_AZURE_EXISTING_AI_PROJECT_RESOURCE_ID" >> $GITHUB_OUTPUT
281305
echo "existing_webapp_url=$INPUT_EXISTING_WEBAPP_URL" >> $GITHUB_OUTPUT
282306
echo "azure_env_use_case=$USE_CASE" >> $GITHUB_OUTPUT
307+
echo "runner_os=$RUNNER_OS" >> $GITHUB_OUTPUT
283308
284309
285310
Run:
286311
needs: validate-inputs
287312
if: needs.validate-inputs.outputs.validation_passed == 'true'
288313
uses: ./.github/workflows/deploy-orchestrator.yml
289314
with:
290-
runner_os: ubuntu-latest
315+
runner_os: ${{ needs.validate-inputs.outputs.runner_os || 'ubuntu-latest' }}
291316
azure_location: ${{ needs.validate-inputs.outputs.azure_location || 'australiaeast' }}
292317
resource_group_name: ${{ needs.validate-inputs.outputs.resource_group_name || '' }}
293318
waf_enabled: ${{ needs.validate-inputs.outputs.waf_enabled == 'true' }}

.github/workflows/deploy-windows.yml

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

0 commit comments

Comments
 (0)