2022-05-09 07:47:54 +08:00
|
|
|
name: Json Validator
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2023-06-04 02:24:27 +08:00
|
|
|
paths:
|
|
|
|
- '**.json'
|
2022-05-09 07:47:54 +08:00
|
|
|
push:
|
2022-05-25 21:35:36 +08:00
|
|
|
branches:
|
|
|
|
- main
|
2023-06-04 02:24:27 +08:00
|
|
|
paths:
|
|
|
|
- '**.json'
|
2022-05-09 07:47:54 +08:00
|
|
|
|
|
|
|
jobs:
|
2023-06-06 16:28:19 +08:00
|
|
|
json-validator:
|
2022-05-09 07:47:54 +08:00
|
|
|
name: Json Validator
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Validate Json
|
|
|
|
run: |
|
2023-06-06 16:30:32 +08:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install python3-pip -y --no-install-recommends
|
2022-05-09 07:47:54 +08:00
|
|
|
sudo pip3 install json-spec
|
|
|
|
json validate --schema-file=php/containers-schema.json --document-file=php/containers.json
|