Skip to content

Commit

Permalink
feat: JSONスキーマチェック処理の追加 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
book000 authored Nov 26, 2022
1 parent a2d1aba commit 73095ac
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/check-schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check schema

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

jobs:
check-schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get schema.json from latest release
run: |
URL=`curl -s https://api.github.com/repos/jaoafa/pat-star-systems/releases/latest | grep "browser_download_url.*json\"" | cut -d : -f 2,3 | tr -d \"`
curl -L -o schema.json $URL
- name: Check schema
run: |
pip install jsonschema
find stella -name "*.pas" | xargs -I{} jsonschema -i {} schema.json
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:

- name: Create schema
run: |
mkdir -p schema
node ./.github/scripts/create-schema.js
sha1sum -b schema.json > schema.json.sha1
Expand Down

0 comments on commit 73095ac

Please sign in to comment.