Merge pull request #19 from aarhusstadsarkiv/acacore-reformatting #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: JSON check | |
on: | |
push: | |
paths: | |
- '**.json' | |
- '**.yml' | |
- '**.yaml' | |
env: | |
PYTHON_VERSION: 3.11.6 | |
jobs: | |
check-schemata: | |
name: Check Schemata | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: python -m pip install jsonschema pyyaml | |
- name: Check JSON Syntax | |
uses: limitusus/json-syntax-check@v2 | |
with: | |
pattern: "\\.json$" | |
- name: Check Actions Schema | |
run: python -c 'import yaml,json,jsonschema,sys;jsonschema.validate(yaml.load(open(sys.argv[1]), yaml.Loader), json.load(open(sys.argv[2])))' actions.yml actions.schema.json |