Skip to content

Commit 396fb4c

Browse files
committed
Create jsoncheck.yml
1 parent 1a517a6 commit 396fb4c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/jsoncheck.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: jsoncheck
2+
3+
permissions:
4+
statuses: write
5+
6+
on:
7+
push:
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: json-syntax-check
16+
uses: limitusus/json-syntax-check@v1
17+
with:
18+
pattern: "\\.json$"
19+
- if: success()
20+
name: update success status
21+
run : |
22+
gh api \
23+
--method POST \
24+
-H "Accept: application/vnd.github+json" \
25+
/repos/PokemonAutomation/ServerConfigs-PA-SHA/statuses/${{ github.sha }} \
26+
-f state='success' \
27+
-f context='json' \
28+
env:
29+
GH_TOKEN: ${{ github.token }}
30+
- if: failure()
31+
name: update failed status
32+
run : |
33+
gh api \
34+
--method POST \
35+
-H "Accept: application/vnd.github+json" \
36+
/repos/PokemonAutomation/ServerConfigs-PA-SHA/statuses/${{ github.sha }} \
37+
-f state='failure' \
38+
-f context='json' \
39+
env:
40+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)