Skip to content

Commit 490aac6

Browse files
fix: ci trigger bool inputs for bicep (#109)
1 parent e89cb84 commit 490aac6

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

alz/github/actions/bicep/main/workflows/cd.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
inputs:
99
skip_what_if:
1010
description: 'Skip What If Check?'
11-
default: false
1211
type: boolean
12+
default: false
1313
%{ for script_file_group in script_file_groups ~}
1414
${script_file_group.name}:
1515
description: 'Run Steps: ${script_file_group.displayName}'
@@ -18,8 +18,8 @@ on:
1818
%{ endfor ~}
1919
destroy:
2020
description: '[DANGER!] Destroy? [DANGER!]'
21-
default: false
2221
type: boolean
22+
default: false
2323

2424
jobs:
2525
plan_and_apply:
@@ -29,8 +29,8 @@ jobs:
2929
id-token: write
3030
contents: read
3131
with:
32-
skip_what_if: $${{ inputs.skip_what_if }}
33-
destroy: $${{ inputs.destroy }}
32+
skip_what_if: $${{ github.event_name != 'workflow_dispatch' && false || inputs.skip_what_if == true }}
33+
destroy: $${{ github.event_name != 'workflow_dispatch' && false || inputs.destroy == true }}
3434
%{ for script_file in script_files ~}
35-
${script_file.name}: $${{ inputs.${script_file.group} }}
35+
${script_file.name}: $${{ github.event_name != 'workflow_dispatch' && true || inputs.${script_file.group} == true }}
3636
%{ endfor ~}

alz/github/actions/bicep/templates/workflows/cd-template.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ jobs:
3030
PARAMETERS_FILE_NAME: parameters.json
3131

3232
steps:
33+
- name: Show inputs
34+
run: |
35+
Write-Host '$${{ toJson(inputs) }}'
36+
shell: pwsh
37+
3338
- name: Checkout Bicep Module
3439
uses: actions/checkout@v4
3540

@@ -107,6 +112,11 @@ jobs:
107112
PARAMETERS_FILE_NAME: parameters.json
108113

109114
steps:
115+
- name: Show inputs
116+
run: |
117+
Write-Host '$${{ toJson(inputs) }}'
118+
shell: pwsh
119+
110120
- name: Checkout Bicep Module
111121
uses: actions/checkout@v4
112122

0 commit comments

Comments
 (0)