-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (34 loc) · 1.18 KB
/
validate-json.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
on:
pull_request:
branches:
- main
name: Validate JSON
jobs:
validate:
name: Validate JSON Files against schemas
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download JSON Schema specification
run: |
curl "http://json-schema.org/draft-06/schema#" | sed 's/"$schema": "http:\/\/json-schema.org\/draft-06\/schema#"/"$schema": "current_schema"/' > .schema/.json_schema.json
- name: Validate JSON Schema
uses: dsanders11/json-schema-validate-action@v1.1.0
with:
files: ".schema/*.json"
schema: ".schema/.json_schema.json"
- name: Validate Category JSON
uses: dsanders11/json-schema-validate-action@v1.1.0
with:
schema: ".schema/category.json"
files: "*/config.json"
- name: Validate Manufacturer JSON
uses: dsanders11/json-schema-validate-action@v1.1.0
with:
schema: ".schema/manufacturer.json"
files: "*/*/config.json"
- name: Validate Controller JSON
uses: dsanders11/json-schema-validate-action@v1.1.0
with:
schema: ".schema/controller.json"
files: "*/*/*/config.json"