Validate JSON, YAML, and TOML files against JSON Schema in your pull requests.
Creates a Lintel Check Run with inline annotations on the files changed in your PR.
name: Lint
on: [pull_request]
permissions:
checks: write
contents: read
jobs:
lintel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: lintel-rs/action@v1With zero configuration Lintel auto-discovers files and matches them against schemas from the SchemaStore catalog.
| Input | Description | Required | Default |
|---|---|---|---|
version |
lintel-github-action version to install |
No | latest |
github-token |
GitHub token for creating Check Runs | No | ${{ github.token }} |
paths |
Paths or globs to validate | No | (auto-discover) |
exclude |
Comma-separated exclude patterns | No | |
no-catalog |
Disable SchemaStore catalog matching | No | false |
args |
Additional arguments passed to lintel-github-action |
No |
Pin a specific release version instead of using the latest.
- uses: lintel-rs/action@v1
with:
version: v0.0.3Token used to create the Check Run. The default github.token is sufficient -- no PAT required.
Space-separated paths or globs to validate. When omitted, Lintel auto-discovers JSON, YAML, and TOML files in the repository.
- uses: lintel-rs/action@v1
with:
paths: "config/**/*.yaml src/*.json"Comma-separated patterns to exclude from validation.
- uses: lintel-rs/action@v1
with:
exclude: "vendor/**, node_modules/**"Disable automatic schema matching from the SchemaStore catalog. Useful when you only want to validate files that have explicit schema mappings in lintel.toml.
- uses: lintel-rs/action@v1
with:
no-catalog: truePass additional arguments directly to the lintel-github-action binary.
- uses: lintel-rs/action@v1
with:
args: "--verbose"- Downloads the
lintel-github-actionbinary from this repo's releases - Runs validation on your repository files
- Creates a GitHub Check Run named Lintel with:
- Inline annotations on files with schema violations
- A summary of all findings
- Pass/fail conclusion
The action needs checks: write permission to create Check Runs and contents: read to access repository files.
permissions:
checks: write
contents: readPlace a lintel.toml in your repository root to configure schema mappings, exclude patterns, and more. See the Lintel documentation for details.