This GitHub action can be used to validate json and yaml files against a JSON Schema.
The schema file used for valiation.
The data files to be validated. Glob pattern is supported.
This action supports most of Ajv options.
The result of the validation.
The errors in case the validation failed.
name: Validation
on:
push:
branches:
- master
jobs:
validate-config:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: validate
uses: ammarlakis/action-ajv@master
with:
schema: schemas/account.schema.json
data: accounts/*.yml
allErrors: true