-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: nythepegasus <[email protected]>
- Loading branch information
1 parent
ec0d2d0
commit b05a61e
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Lint JSON | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
json-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache APT packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: /var/cache/apt/archives | ||
key: ${{ runner.os }}-apt-cache | ||
restore-keys: | | ||
${{ runner.os }}-apt-cache | ||
- name: Update APT cache | ||
run: sudo apt-get update | ||
|
||
- name: Install jq | ||
run: sudo apt-get install -y jq | ||
|
||
- name: Lint servers.json | ||
run: | | ||
if ! jq empty servers.json; then | ||
echo "Invalid JSON file detected in servers.json" | ||
exit 1 | ||
else | ||
echo "servers.json is valid" | ||
fi |