@@ -5,7 +5,7 @@ A GitHub action that uses [Yamale][] for YAML schema validation.
55## Usage
66
77- Filenames are relative to the repository root.
8- - Enable strict checking by setting ` strict ` to a non-empty string .
8+ - Disable strict checking by setting ` no- strict` to ` true ` , ` 1 ` or ` yes ` .
99- For help with the schema definitions and reference, see [ Yamale] [ ] .
1010
1111The following example sets up a check to validate a YAML file in your
@@ -20,25 +20,27 @@ jobs:
2020 runs-on: ubuntu-latest
2121 steps:
2222 - uses: actions/checkout@v2
23- - uses: nrkno/yaml-schema-validator-github-action@master
23+ - uses: nrkno/yaml-schema-validator-github-action@v4
2424 with:
25- schema: ' schemas/schema.yaml'
26- target: ' target.yaml'
27- # Uncomment to enable strict checks
28- # strict: '1'
25+ schema: schemas/schema.yaml
26+ target: target.yaml
27+ # Uncomment to disable strict checks
28+ # no- strict: true
2929```
3030
31- ### Versioning
31+ ## Versioning
3232
33- To bind the action to a specific release, prefix with ` @<tag> ` .
34- E.g. ` nrkno/yaml-schema-validator-github-action@v0.1.0 ` .
33+ This action is meant to be a wrapper around Yamale, so as of version 4.x
34+ of Yamale, this action will follow Yamale's major version scheme.
35+
36+ To bind the action to a specific release, suffix with ` @<tag> ` .
37+ E.g. ` nrkno/yaml-schema-validator-github-action@v4 ` .
3538
3639https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses
3740
3841## Developing
3942
40- Create and enable a Python virtualenv (not strictly required, but makes testing
41- more robust)
43+ Create and enable a Python virtualenv
4244
4345```
4446$ python -m venv venv
@@ -51,21 +53,12 @@ Install dependencies
5153$ pip install -r requirements.txt
5254```
5355
54- Do a test-run with the provided examples
56+ Do a test-run with one of the provided examples
5557
5658```
57- $ ./entrypoint.sh example/schema.yaml example/file.yaml
59+ $ INPUT_SCHEMA=example/schema.yaml \
60+ INPUT_TARGET=example/file-valid-strict.yaml \
61+ ./entrypoint.sh
5862```
5963
60- ### Using Docker
61-
62- Build the container and reference files within the example/ folder.
63-
64- ```
65- $ docker build -t yaml-schema-validator .
66- $ docker run yaml-schema-validator example/schema.yaml example/file.yaml
67- $ docker run yaml-schema-validator example/schema.yaml example/file-invalid.yaml
68- ```
69-
70-
7164[ Yamale ] : https://github.com/23andMe/Yamale
0 commit comments