-
Notifications
You must be signed in to change notification settings - Fork 765
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
Schema validation issues found in action.yml for two "default" values #747
Comments
Hello @Coderrob , |
Hi @Coderrob, Thank you for bringing this up. It appears that the issue you're encountering is due to a mismatch between the expected data types in the schema you are using for validation. The default field in our action.yml specifies a boolean value, which is valid within the context of our implementation. We are not experiencing any errors or issues on our end with this configuration. However, it is possible that the schema you are using for validation expects a string value for the default field. This may be the root cause of the discrepancy. |
Hi @Coderrob, Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know. |
@gowridurgad - I verified with the official Microsoft GitHub Actions documentation and "default" values are expected to be in string format, which is the reason why VSCode was flagging the boolean as invalid for the properties value: inputs.<input_id>.default The defaults should be changed to 'true' or 'false' to be compliant with YAML schema validation checks. All the "input" field values get changed into strings. They're all backed by ENV variables, which are all strings. That's why there is a The schema definition that was flagging the fields mentioned in the issue is directly from VSCode using the GitHub Actions Workflow schema hosted in the json.schemastore.org. You can see the schema expectations as well: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/github-workflow.json Ultimately if you all don't want to change it, that's a valid life choice, just wanted to point out that schema validators will fail because of the invalid data type format. The action will do what it does now without issue because it's converted to string eventually. Just lemme know. I can close this or you may as well if it's a no-op from your side. |
Description:
Using Action schema with YAML validation I was running a self-documentation test for another action. It noticed and failed validation for the setup-java repo's action.yml because of two invalid "default" field values where a boolean value was set where a string value is expected.
Repro steps:
Your repo.
Expected behavior:
The action.yml should be schema validated.
Actual behavior:
The action.yml is not schema validated.
Opened a PR with the minor changes => #746
The text was updated successfully, but these errors were encountered: