Skip to content

chore(deps): update tj-actions/changed-files action to v44 - autoclosed #45

chore(deps): update tj-actions/changed-files action to v44 - autoclosed

chore(deps): update tj-actions/changed-files action to v44 - autoclosed #45

name: Validate JSONs
on:
workflow_call:
workflow_dispatch:
pull_request:
jobs:
validate-jsons:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: fts3-databases
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18' # Use the Node.js version you prefer
- name: Install dependencies
run: npm install ajv-cli
- name: Validate JSON
run: |
FILENAME="./fts3-databases/databases/*.json"
SCHEMA="./fts3-databases/database_schema.json"
if npx ajv validate --spec=draft2020 --errors=text -s "$SCHEMA" -d "$FILENAME"; then
echo "JSON is valid."
else
echo "JSON is invalid."
exit 1
fi