Skip to content

Commit 65656cd

Browse files
fix: Update Bicep validation workflow to include push trigger and simplify notification conditions
1 parent 13c027d commit 65656cd

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/validate-bicep-params.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
- 'infra/**/*.bicep'
1515
- 'infra/**/*.parameters.json'
1616
workflow_dispatch:
17+
push:
18+
branches:
19+
- hb-psl-38859
1720

1821
env:
1922
accelerator_name: "Content Processing"
@@ -34,8 +37,10 @@ jobs:
3437
id: validate_infra
3538
continue-on-error: true
3639
run: |
40+
set +e
3741
python infra/scripts/validate_bicep_params.py --dir infra --strict --no-color --json-output infra_results.json 2>&1 | tee infra_output.txt
3842
EXIT_CODE=${PIPESTATUS[0]}
43+
set -e
3944
echo "## Infra Param Validation" >> "$GITHUB_STEP_SUMMARY"
4045
echo '```' >> "$GITHUB_STEP_SUMMARY"
4146
cat infra_output.txt >> "$GITHUB_STEP_SUMMARY"
@@ -61,7 +66,7 @@ jobs:
6166
retention-days: 30
6267

6368
- name: Send schedule notification on failure
64-
if: github.event_name == 'schedule' && steps.result.outputs.status == 'failure'
69+
if: steps.result.outputs.status == 'failure'
6570
env:
6671
LOGICAPP_URL: ${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}
6772
GITHUB_REPOSITORY: ${{ github.repository }}
@@ -81,7 +86,7 @@ jobs:
8186
-d @- || echo "Failed to send notification"
8287
8388
- name: Send schedule notification on success
84-
if: github.event_name == 'schedule' && steps.result.outputs.status == 'success'
89+
if: steps.result.outputs.status == 'success'
8590
env:
8691
LOGICAPP_URL: ${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}
8792
GITHUB_REPOSITORY: ${{ github.repository }}

0 commit comments

Comments
 (0)