mirror of
https://github.com/hashicorp/front-matter-schema
synced 2026-04-05 19:03:02 +00:00
No description
- JavaScript 65.8%
- Makefile 22.3%
- Dockerfile 11.9%
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> |
||
|---|---|---|
| action.yml | ||
| Dockerfile | ||
| index.js | ||
| LICENSE | ||
| Makefile | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
Front Matter Schema Checker
This Github Action checks the schema of YAML front matter.
Usage
---
name: Check Front Matter
on: [push]
jobs:
front-matter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v1.1.3
with:
separator: ","
- name: Front Matter
id: lint
uses: hashicorp/front-matter-schema@main
with:
files: ${{ steps.changed-files.outputs.all_modified_files }}
directories: |
items
schema: |
{
"properties": {
"title": {
"type": "string",
"required": true
}
}
}
Given Github Actions not supporting multi-dimensional inputs like hashes, I'm just passing the
schemain as raw JSON. This could however be the output of another step as well.