Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
include validFiles in the outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh authored and velsietis committed Jan 10, 2022
1 parent d6d0e9a commit 77a04a1
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 28 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ All you need is a **.vscode/settings.json** document at the root of the reposito

### `settingsFile` (optional)

Location of the schema configuration file.
Location of the schema configuration file.

The default location is **.vscode/settings.json**, you can change it do a different location but it but still be a json document containing the `yaml.schemas` config.
See the [VS Code YAML Extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) for how to structure the config.
Expand All @@ -35,9 +35,13 @@ Instead of adding the `yaml.schemas` config to a file, you can instead supply it
## Outputs
### `validFiles`

A comma separated list of files that passed the schema validation.

### `invalidFiles`

A comma separated list of files that failed the schema validation.
A comma separated list of files that failed the schema validation.

> Schema validation fails if any results are returned from the YAML Language Server

Expand All @@ -49,6 +53,6 @@ A comma separated list of files that failed the schema validation.
- uses: nwisbeta/[email protected]

## Thanks
This action has been made by 're-mixing' logic from these repos:
- https://github.com/OrRosenblatt/validate-json-action
This action has been made by 're-mixing' logic from these repos:
- https://github.com/OrRosenblatt/validate-json-action
- https://github.com/redhat-developer/yaml-language-server
8 changes: 5 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
name: 'YAML Schema Validator'
description: 'Validate YAML files in a repo according to settings'
inputs:
settingsFile:
settingsFile:
description: 'Location of schema configuration file'
required: false
default: '.vscode/settings.json'
yamlSchemasJson:
description: 'The yaml.schemas config as inline JSON'
required: false
outputs:
invalidFiles:
validFiles:
description: 'Comma separated list of files that passed the schema validation'
invalidFiles:
description: 'Comma separated list of files that failed the schema validation'
runs:
using: 'node12'
main: 'lib/index.js'
branding:
branding:
icon: 'check'
color: orange
Loading

0 comments on commit 77a04a1

Please sign in to comment.