Skip to content

Commit

Permalink
Simple JSON validation
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik authored and Tearran committed Sep 26, 2024
1 parent dc27ab3 commit bd256bc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/validate-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Validate JSON

on:
pull_request:
types: [opened, reopened, edited, synchronize, review_requested]

concurrency:
group: validate-json-${{github.event.pull_request.number}}
cancel-in-progress: true

jobs:
editorconfig:
name: "Validate JSON"
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4
with:
path: 'config'

- name: Check JSON
run: |
JSON=$(cat config/lib/armbian-configng/config.ng.jobs.json | jq)
EMPTY=$(cat config/lib/armbian-configng/config.ng.jobs.json | jq | nl | grep '"author": ""' | awk '{print $1}' | paste -s -d, -)
echo "## Warning: Empty author field in lines:" >> $GITHUB_STEP_SUMMARY
echo $EMPTY >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion lib/armbian-configng/config.ng.jobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -971,4 +971,4 @@
]
}
]
}
}

0 comments on commit bd256bc

Please sign in to comment.