lintel-github-action 0.0.11

GitHub Action support for Lintel — creates Check Runs with inline annotations
Documentation

lintel-github-action

Crates.io docs.rs GitHub License

Validate JSON, YAML, and TOML files against JSON Schema in your pull requests. Creates a GitHub Check Run named Lintel with inline annotations using the Checks API.

Available as lintel github-action in the main lintel binary and used by the lintel-rs/action GitHub Action.

Quick start

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@v0

With zero configuration Lintel auto-discovers files and matches them against schemas from the SchemaStore catalog.

Action inputs

Input Description Default
version lintel-github-action version to install latest
github-token GitHub token for creating Check Runs ${{ github.token }}
paths Space-separated paths or globs to validate (auto-discover)
exclude Comma-separated exclude patterns
args Additional arguments passed to the binary

Examples

Validate specific paths

- uses: lintel-rs/action@v0
  with:
    paths: "config/**/*.yaml src/*.json"

Exclude directories

- uses: lintel-rs/action@v0
  with:
    exclude: "vendor/**, node_modules/**"

Pin a specific version

- uses: lintel-rs/action@v0
  with:
    version: v0.0.9

Configuration

Place a lintel.toml in your repository root to configure schema mappings, exclude patterns, and more. See the Lintel documentation for details.

How it works

  1. Downloads the lintel binary from the lintel releases
  2. Runs lintel github-action (validation + format checks) on your repository files
  3. Creates a GitHub Check Run with inline annotations on files with schema violations or format issues (batched at 50 per API call)
  4. Reports pass/fail with a summary table

Permissions

The action needs checks: write to create Check Runs and contents: read to access repository files.

permissions:
  checks: write
  contents: read

Environment variables

When running the binary directly (outside the GitHub Action wrapper), these environment variables are required:

Variable Description
GITHUB_TOKEN GitHub token with checks:write permission
GITHUB_REPOSITORY Repository in owner/repo format
GITHUB_SHA Commit SHA to annotate
GITHUB_API_URL GitHub API base URL (defaults to https://api.github.com)

All of these are set automatically when running inside GitHub Actions.

License

Apache-2.0