json-yaml-validate

A GitHub Action to quickly validate JSON and YAML files in a repository

MIT License

Stars
28
Committers
8

Bot releases are hidden (Show)

json-yaml-validate - v1.3.1

Published by GrantBirki over 1 year ago

v1.3.1

This patch release updates dependent node packages of this Action and minor documentation fixes

What's Changed

Full Changelog: https://github.com/GrantBirki/json-yaml-validate/compare/v1.3.0...v1.3.1

json-yaml-validate - v1.3.0

Published by GrantBirki over 1 year ago

v1.3.0

NEW - exclude_file input option

This release introduces a new input option for the Action:

  • exclude_file - The full path to a file in the repository where this Action is running that contains a list of '.gitignore'-style patterns to exclude files from validation (e.g. ./exclude.txt)

Excluding Files

Now, there are three main ways you can go about excluding files from being validated with this Action:

  • json_exclude_regex - A regex string that will be used to exclude JSON files from being validated
  • yaml_exclude_regex - A regex string that will be used to exclude YAML files from being validated
  • exclude_file - best way to exclude files - A file that contains a list of files to exclude from being validated in gitignore format

It should be strongly noted that both json_exclude_regex and yaml_exclude_regex options get unwieldy very quickly and are not recommended. The exclude_file option is the best way to exclude files from being validated. Especially if you have a large repository with many files.
Example of an exclude_file's contents:

# exclude all files in the test/ directory
test/

# exclude a yaml file at an exact path
src/cool-path/example.yaml

# exclude all json files with some glob matching
*.test.json

If the file path to your exclude_file is exclude.txt, you would set the exclude_file input to exclude.txt like so:

# checkout the repository
- uses: actions/[email protected]

- name: json-yaml-validate
  uses: GrantBirki/[email protected] # replace with the latest version
  with:
    exclude_file: exclude.txt # gitignore style file that contains a list of files to exclude

What's Changed

New Contributors

Full Changelog: https://github.com/GrantBirki/json-yaml-validate/compare/v1.2.0...v1.3.0

json-yaml-validate - v1.2.0

Published by GrantBirki over 1 year ago

v1.2.0

Improve schema validation steps by ignoring the schema files themselves

Full Changelog: https://github.com/GrantBirki/json-yaml-validate/compare/v1.1.0...v1.2.0

json-yaml-validate - v1.1.0

Published by GrantBirki over 1 year ago

v1.1.0

Adding regex exclude options

Full Changelog: https://github.com/GrantBirki/json-yaml-validate/compare/v1.0.0...v1.1.0

json-yaml-validate - v1.0.0

Published by GrantBirki over 1 year ago

v1.0.0

Initial release of the Action 🚀

Full Changelog: https://github.com/GrantBirki/json-yaml-validate/compare/v0.0.1...v1.0.0

json-yaml-validate - v0.0.1

Published by GrantBirki over 1 year ago