Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit 23206a3

Browse files
committed
add json lint actions
1 parent 322d9db commit 23206a3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/jsonlint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Check Json format
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/[email protected]
11+
- name: Get Diff Action
12+
uses: technote-space/[email protected]
13+
with:
14+
SUFFIX_FILTER: .json
15+
- name: Install node
16+
run: |
17+
sudo apt install nodejs
18+
- name: Install jsonlint
19+
run: |
20+
sudo npm install -g jsonlint
21+
- name: Lint with jsonlint
22+
run: |
23+
for file in ${{ env.GIT_DIFF }}; do npx jsonlint $file; done
24+
if: env.GIT_DIFF

0 commit comments

Comments
 (0)