Skip to content

Commit 62918c1

Browse files
kemotahaclaude
andcommitted
github-actions: use inputs.no_pr != true to avoid GHA boolean coercion
Address review feedback on the no_pr guard: `!inputs.no_pr` can be ambiguous in GitHub Actions expressions because boolean inputs may arrive as the string 'true'/'false' in some contexts, where the negation `!` would always evaluate to false (strings are truthy). Switch to explicit `inputs.no_pr != true` comparison which is robust across both boolean and string forms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7b620c8 commit 62918c1

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/kernel-build-and-test-multiarch.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,14 +1202,16 @@ jobs:
12021202
name: Create Pull Request
12031203
runs-on: kernel-build
12041204
needs: [pre-setup, setup, build, boot, test-kselftest, compare-kselftest, test-ltp, compare-ltp]
1205-
# The (workflow_dispatch || !no_pr) clause lets manual reruns opt out of
1206-
# PR creation by passing -f no_pr=true. workflow_run events (normal CI)
1207-
# are unaffected since inputs.no_pr is not set there.
1205+
# The (workflow_dispatch || no_pr != true) clause lets manual reruns opt
1206+
# out of PR creation by passing -f no_pr=true. workflow_run events (normal
1207+
# CI) are unaffected since inputs.no_pr is not set there. The explicit
1208+
# `!= true` form avoids the boolean/string coercion ambiguity that affects
1209+
# `!inputs.no_pr` in some GHA expression contexts.
12081210
if: |
12091211
always() &&
12101212
needs.build.result == 'success' &&
12111213
needs.boot.result == 'success' &&
1212-
(github.event_name != 'workflow_dispatch' || !inputs.no_pr)
1214+
(github.event_name != 'workflow_dispatch' || inputs.no_pr != true)
12131215
12141216
steps:
12151217
- name: Check if branch name matches a supported pattern

0 commit comments

Comments
 (0)