GitHub Action
actions-validate-yaml
v1.0
Latest version
Validate YAML files with a JSON schema. Using validate-yaml
In order to use RomanosTrechlis/actions-validate-yaml, follow the instructions bellow:
- Create the .github/workflows directory in your root directory
- Create a yml file with an appropriate name
- Copy the following script into that file
- Change input variables
- Commit and push
on:
push:
paths:
- '**.yml'
- '**.yaml'
release:
types: [created]
name: Validate YAML
jobs:
releases-matrix:
name: Validate YAML
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: RomanosTrechlis/actions-validate-yaml@master
with:
schema: spec.json
data: |-
file1.yml
file2.yml
There are two input for this action:
- schema: is the schema specification in .json or .yaml file
- data: a string of multiple files to validate separated by new line