forked from c2pa-org/softbinding-algorithm-list
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (26 loc) · 982 Bytes
/
validate-json.yaml
File metadata and controls
32 lines (26 loc) · 982 Bytes
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
name: JSON Schema Validation
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
validate-json:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install sourcemeta json schema cli
uses: sourcemeta/jsonschema@main
- name: Lint JSON files
run: |
echo "Linting softbinding-algorithm-list.schema.json..."
set -e # Exit on any error
jsonschema lint softbinding-algorithm-list.schema.json
echo "✓ softbinding-algorithm-list.schema.json passed linting"
- name: Validate against schema
run: |
echo "Validating softbinding-algorithm-list.json against schema..."
set -e # Exit on any error
jsonschema validate softbinding-algorithm-list.schema.json softbinding-algorithm-list.json
echo "✓ softbinding-algorithm-list.json is valid against the schema"