Validate Configs Action
June 25, 2026 ยท View on GitHub
A GitHub Action that catches broken config files in your PRs before they cause problems. Supports JSON, YAML, TOML, XML, INI, HCL, JSONC, KDL, Justfiles, and a bunch more. Errors show up as inline annotations on the PR diff so you know exactly what broke and where.
If a file has a $schema or XSD declaration, it gets schema-validated too. You can also enable SchemaStore for automatic schema lookups on common files like package.json and tsconfig.json.
Quick Start
- uses: Boeing/validate-configs-action@v2
Add it to any job with actions/checkout and it'll validate every config file in the repo.
Usage
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Boeing/validate-configs-action@v2
Only validate changed files
If you've got a big repo, you probably don't want to validate everything on every PR:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Boeing/validate-configs-action@v2
with:
only-changed: "true"
You need fetch-depth: 0 so git can figure out which files actually changed.
Exclude directories
Skip the stuff you don't care about:
- uses: Boeing/validate-configs-action@v2
with:
exclude-dirs: "vendor,testdata,node_modules"
Respect ignore files
Already have a .dockerignore or .prettierignore? Use those same patterns to skip files:
- uses: Boeing/validate-configs-action@v2
with:
ignore-files: ".dockerignore,.prettierignore"
SchemaStore
SchemaStore is a community catalog of JSON Schemas for common config files. Turn it on and you get schema validation for hundreds of files out of the box:
- uses: Boeing/validate-configs-action@v2
with:
schemastore: "true"
Outputs
- uses: Boeing/validate-configs-action@v2
id: validate
continue-on-error: true
- run: |
echo "Files validated: ${{ steps.validate.outputs.files-validated }}"
echo "Files failed: ${{ steps.validate.outputs.files-failed }}"
Inputs
| Input | Default | Description |
|---|---|---|
search-paths | "." | Space-separated dirs or files to scan |
exclude-dirs | "" | Comma-separated dirs to skip |
exclude-file-types | "" | Comma-separated file types to skip (e.g. csv,xml) |
file-types | "" | Only validate these file types. Can't use with exclude-file-types |
depth | "" | Recursion depth. 0 means don't recurse |
reporter | "standard" | Output format. Options: standard, json, junit, sarif, github. Use type:path for file output, comma-separate for multiple |
group-by | "" | Group output: filetype, directory, or pass-fail |
quiet | "false" | Suppress stdout |
globbing | "false" | Use glob patterns in search-paths. Can't combine with exclude-dirs/exclude-file-types/file-types |
require-schema | "false" | Fail files that could have a schema but don't declare one |
no-schema | "false" | Skip all schema validation, syntax only |
schemastore | "false" | Auto-lookup schemas from the embedded SchemaStore catalog |
schemastore-path | "" | Path to a local SchemaStore clone (for air-gapped envs). Implies schemastore |
type-map | "" | Map globs to file types: pattern:type (e.g. **/inventory:ini) |
schema-map | "" | Map globs to schemas: pattern:schema_path (e.g. **/config.json:schemas/config.schema.json) |
only-changed | "false" | Only check files changed in the current PR |
gitignore | "false" | Skip files matched by .gitignore |
ignore-files | "" | Comma-separated list of gitignore-style pattern files to use as filters (e.g. .dockerignore,.prettierignore) |
Supported file types
csv, editorconfig, env, hcl (.tf, .tfvars), hocon, ini, json, jsonc, justfile, kdl, plist, properties, sarif, toml, toon, xml, yaml
Plus ~90 well-known filenames (.babelrc, tsconfig.json, Pipfile, pom.xml, etc.) are auto-detected even without a file extension.
Outputs
| Output | Description |
|---|---|
files-validated | Total files scanned |
files-failed | Files that failed validation |
exit-code | 0 = success, 1 = validation errors, 2 = runtime error |
Examples
Filtering
Only specific file types
- uses: Boeing/validate-configs-action@v2
with:
file-types: "json,yaml"
Exclude file types
- uses: Boeing/validate-configs-action@v2
with:
exclude-file-types: "csv,xml"
No recursion
- uses: Boeing/validate-configs-action@v2
with:
depth: 0
Glob patterns
- uses: Boeing/validate-configs-action@v2
with:
globbing: "true"
search-paths: "**/*.json config/**/*.yaml"
Use existing ignore files
- uses: Boeing/validate-configs-action@v2
with:
ignore-files: ".dockerignore,.prettierignore"
Reporters
GitHub annotations (inline on the PR diff)
- uses: Boeing/validate-configs-action@v2
with:
reporter: "github"
JSON
- uses: Boeing/validate-configs-action@v2
with:
reporter: "json"
Multiple reporters with file output
- uses: Boeing/validate-configs-action@v2
with:
reporter: "standard,json:output.json,junit:results.xml,sarif:results.sarif"
Group by pass/fail
- uses: Boeing/validate-configs-action@v2
with:
group-by: "pass-fail"
Schema Validation
SchemaStore (automatic)
- uses: Boeing/validate-configs-action@v2
with:
schemastore: "true"
Local SchemaStore (air-gapped)
- run: git clone --depth=1 https://github.com/SchemaStore/schemastore.git
- uses: Boeing/validate-configs-action@v2
with:
schemastore-path: "./schemastore"
Require schemas
- uses: Boeing/validate-configs-action@v2
with:
require-schema: "true"
Syntax only (no schema validation)
- uses: Boeing/validate-configs-action@v2
with:
no-schema: "true"
Map custom schemas to files
- uses: Boeing/validate-configs-action@v2
with:
schema-map: "**/package.json:schemas/package.schema.json,**/config.xml:schemas/config.xsd"
Advanced
Kitchen sink
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Boeing/validate-configs-action@v2
with:
only-changed: "true"
exclude-dirs: "vendor,generated,testdata"
ignore-files: ".prettierignore"
schema-map: "**/app-config.json:schemas/app.schema.json"
type-map: "**/inventory:ini,**/.env.*:env"
reporter: "standard,junit:results.xml"
schemastore: "true"
Map unrecognized files to a type
- uses: Boeing/validate-configs-action@v2
with:
type-map: "**/inventory:ini,**/*.cfg:json"
Use outputs for conditional logic
- uses: Boeing/validate-configs-action@v2
id: validate
continue-on-error: true
- run: |
if [ "${{ steps.validate.outputs.files-failed }}" != "0" ]; then
echo "๐ฌ ${{ steps.validate.outputs.files-failed }} files failed"
exit 1
fi