Skip to content

GitHub action for running Ajv JSON schema validator.

Notifications You must be signed in to change notification settings

ammarlakis/action-ajv

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Ajv JSON Schema Validator Action

This GitHub action can be used to validate json and yaml files against a JSON Schema.

Inputs

schema

The schema file used for valiation.

data

The data files to be validated. Glob pattern is supported.

Additional options

This action supports most of Ajv options.

Outputs

valid

The result of the validation.

errors

The errors in case the validation failed.

Example usage

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

About

GitHub action for running Ajv JSON schema validator.

Resources

Stars

Watchers

Forks

Packages

No packages published