Skip to content

Commit ec8dda7

Browse files
EMaherCopilot
andcommitted
feat: use choice type for sku/log_level inputs, add Azure region validation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0ffb755 commit ec8dda7

3 files changed

Lines changed: 36 additions & 5 deletions

File tree

.github/workflows/integration-redact-secrets.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,17 @@ jobs:
9494
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
9595
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
9696

97+
- name: Validate Azure Region
98+
shell: bash
99+
run: |
100+
LOCATION="${{ inputs.location }}"
101+
if [[ -z "$LOCATION" ]]; then LOCATION="centralus"; fi
102+
VALID_LOCATIONS=$(az account list-locations --query "[].name" -o tsv)
103+
if ! echo "$VALID_LOCATIONS" | grep -qx "$LOCATION"; then
104+
echo "::error::Invalid Azure region: '$LOCATION'. Run 'az account list-locations --query [].name' to see valid options."
105+
exit 1
106+
fi
107+
97108
- name: Run redaction integration test
98109
shell: pwsh
99110
env:

.github/workflows/integration-test.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ on:
4444
type: string
4545
default: 'centralus'
4646
log_level:
47-
description: 'PowerShell log level (Info, Verbose, Debug)'
47+
description: 'Log level'
4848
required: false
49-
type: string
49+
type: choice
50+
options:
51+
- Info
52+
- Verbose
53+
- Debug
5054
default: Verbose
5155

5256
workflow_call:
@@ -62,7 +66,7 @@ on:
6266
type: string
6367
default: 'centralus'
6468
log_level:
65-
description: 'PowerShell log level (Info, Verbose, Debug)'
69+
description: 'Log level'
6670
required: false
6771
type: string
6872
default: Verbose
@@ -118,6 +122,17 @@ jobs:
118122
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
119123
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
120124

125+
- name: Validate Azure Region
126+
shell: bash
127+
run: |
128+
LOCATION="${{ inputs.location }}"
129+
if [[ -z "$LOCATION" ]]; then LOCATION="centralus"; fi
130+
VALID_LOCATIONS=$(az account list-locations --query "[].name" -o tsv)
131+
if ! echo "$VALID_LOCATIONS" | grep -qx "$LOCATION"; then
132+
echo "::error::Invalid Azure region: '$LOCATION'. Run 'az account list-locations --query [].name' to see valid options."
133+
exit 1
134+
fi
135+
121136
- name: Run Round-Trip Phase 1 (Deploy)
122137
id: phase1
123138
shell: pwsh

.github/workflows/release-tests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ on:
3131
type: string
3232
default: 'centralus'
3333
log_level:
34-
description: 'Log level for all-types integration test (Info, Verbose, Debug)'
34+
description: 'Log level'
3535
required: false
36-
type: string
36+
type: choice
37+
options:
38+
- Info
39+
- Verbose
40+
- Debug
41+
default: Verbose
3742
default: Verbose
3843

3944
permissions:

0 commit comments

Comments
 (0)