Skip to content

Commit 4cd9833

Browse files
committed
gha/validate-pr: Replace continue-on-error
The label validation steps now properly fail the workflow when required labels are missing, instead of continuing with errors. This change removes the `continue-on-error: true` directives and adds `always()` conditions to ensure the validation steps run regardless of previous step outcomes. Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 4bff12f commit 4cd9833

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/validate-pr.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ jobs:
1919
timeout-minutes: 120 # guardrails timeout for the whole job
2020
steps:
2121
- name: Missing `area/` label
22-
continue-on-error: true
23-
if: contains(join(github.event.pull_request.labels.*.name, ','), 'impact/') && !contains(join(github.event.pull_request.labels.*.name, ','), 'area/')
22+
if: always() && contains(join(github.event.pull_request.labels.*.name, ','), 'impact/') && !contains(join(github.event.pull_request.labels.*.name, ','), 'area/')
2423
run: |
2524
echo "::error::Every PR with an 'impact/*' label should also have an 'area/*' label"
2625
exit 1
2726
- name: Missing `kind/` label
28-
continue-on-error: true
29-
if: contains(join(github.event.pull_request.labels.*.name, ','), 'impact/') && !contains(join(github.event.pull_request.labels.*.name, ','), 'kind/')
27+
if: always() && contains(join(github.event.pull_request.labels.*.name, ','), 'impact/') && !contains(join(github.event.pull_request.labels.*.name, ','), 'kind/')
3028
run: |
3129
echo "::error::Every PR with an 'impact/*' label should also have a 'kind/*' label"
3230
exit 1

0 commit comments

Comments
 (0)