From 6fc4d63bf2bf2606fc0df43a713720e9fa9ccd0d Mon Sep 17 00:00:00 2001 From: Britton Hayes Date: Fri, 1 Oct 2021 00:36:12 -0700 Subject: [PATCH] fix: updated readme to include usage instructions --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index 192aaf6..44eca18 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,39 @@ # Validate YAML > Github action to validate yaml files against a JSON schema + +## Usage + +Validate your YAML files against a JSON structure by providing a schema path and a list of files. + +```yaml +- name: Validate YAML + uses: brittonhayes/validate-yaml + with: + schemaPath: 'schema.json' + files: | + example/foo.yaml +``` + +### Example JSON Schema + +```json +{ + "test": { + "structure": { + "myValue": "string", + "myValue2": "string" + } + } +} +``` + +### Example Valid YAML for this schema + +```yaml +--- +test: + structure: + myValue: '1' + myValue2: '2' +```