Skip to content

Commit 2ca7387

Browse files
authored
fix(ci): Correct boolean comparison in check-version action (#15105)
The `inputs.diff-search == false` comparison always evaluated to `false` because composite action inputs are strings, not booleans. > actions/runner#2238 This caused `static-checking` to be set to an empty string instead of `'localIsNew'`, making version-check fall back to commit history search mode and fail to detect version changes.
1 parent 3fbb307 commit 2ca7387

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/actions/check-version/action.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ inputs:
1515

1616
diff-search:
1717
required: false
18-
type: boolean
19-
default: false
20-
description: Use git diff to check for version changes instead of comparing with external URL
18+
default: "false"
19+
description: Use git diff to check for version changes instead of comparing with external URL (pass 'true' or 'false' as string)
2120

2221
outputs:
2322
version:
@@ -34,7 +33,7 @@ runs:
3433
uses: EndBug/version-check@5102328418c0130d66ca712d755c303e93368ce2 # v2.1.7
3534
id: version
3635
with:
37-
static-checking: ${{ inputs.diff-search == false && 'localIsNew' || '' }}
36+
static-checking: ${{ inputs.diff-search != 'true' && 'localIsNew' || '' }}
3837
diff-search: ${{ inputs.diff-search }}
3938
file-url: ${{ inputs.file-url }}
4039
file-name: ${{ inputs.file-name }}

0 commit comments

Comments
 (0)