-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
actionlint detect warning when using inputs type conversion with fromJSON #181
Comments
Thank you for the detailed report with reproduction. This looks a bug of actionlint. |
Type of the input is specified as I'm not sure this is an expected behavior because the official document says:
https://docs.github.com/en/actions/learn-github-actions/contexts#inputs-context From this document, correct type of the |
I made a question at https://github.com/orgs/community/discussions/29796 |
@guitarrapc By the way, is-valid: ${{ inputs.is-valid }} |
Im running into this issue with the following code
If a fix is not possible, I would appreciate a way to annotate the code to ignore the linter for this line |
Summary
actionlint warn when trying to use JSON data type conversion pattern and it's too strict, or other word too smart then what agent do.
Warning message
Detail
When reusable workflow have inputs type
boolean
and want pass boolean from workflow_dispatch, JSON data type convert withfromJSON
expression is officially introduced pattern.Without
fromJSON
,github.event.inputs.foo
treat asstring
and cannot pass to workflow_call.However actionlint warn this and seems guessing parameter as boolean is too smart then what agent do.
Reproduce code
actionlint.yaml
and_reusable.yaml
Workaround
Pass string to
fromJSON
not boolean, viaformat('{0}', github.event.inputs.foo)
.The text was updated successfully, but these errors were encountered: