1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

[CI skip] Added Wiki schema validation

This commit is contained in:
TheBusyBiscuit 2020-10-04 21:02:33 +02:00
parent 4a7367d6ec
commit 67bf85e5f8
4 changed files with 34 additions and 1 deletions

9
.github/configs/wiki-schema.json vendored Normal file
View File

@ -0,0 +1,9 @@
{
"type" : "object",
"additionalProperties" : false,
"patternProperties" : {
"^[A-Z0-9_]+$" : {
"type" : "string"
}
}
}

24
.github/workflows/json-validator.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Validate JSON
on:
push:
paths:
- 'src/main/resources/wiki.json'
pull_request:
paths:
- 'src/main/resources/wiki.json'
jobs:
validate:
name: Validate JSON
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Validate JSON
uses: docker://orrosenblatt/validate-json-action:latest@sha256:02370758b8b199e0477da11ecfdd498c75c561685056b5c31b925a4ab95df7f4
env:
INPUT_SCHEMA: '.github/configs/wiki-schema.json'
INPUT_JSONS: 'src/main/resources/wiki.json'

View File

@ -20,4 +20,4 @@ jobs:
- name: YAML Linter
uses: ibiqlik/action-yamllint@v1.0.0
with:
config_file: '.github/yaml-linter-config.yml'
config_file: '.github/configs/yaml-linter.yml'