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