Skip to content

Added schema for 1.21.20.24 beta #48

Added schema for 1.21.20.24 beta

Added schema for 1.21.20.24 beta #48

name: Validate item ID/meta upgrade schemas
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
- name: Install ajv-cli
run: npm install -g ajv-cli
- name: Validate item ID/meta upgrade schemas
run: |
exit_code=0
for file in $(ls id_meta_upgrade_schema); do
prefix=$(echo $file | cut -d _ -f1);
if [[ $(ls id_meta_upgrade_schema | grep ^"$prefix" | wc -l) -gt 1 ]]; then
echo "Duplicate prefix $prefix"
exit_code=1
fi
done
for i in $(ls id_meta_upgrade_schema); do
ajv validate -s id_meta_upgrade_schema_schema.json -d id_meta_upgrade_schema/$i || exit_code=1
done
exit $exit_code