Ammo values update #4
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
name: Validate JSON Files | |
on: | |
pull_request: | |
paths: | |
- '**.json' | |
workflow_dispatch: | |
jobs: | |
validate-json: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 # Update to use Node.js 20 | |
- name: Install jq | |
run: sudo apt-get update && sudo apt-get install -y jq | |
- name: Find and validate JSON files | |
run: | | |
find . -name "*.json" -type f | while read file; do | |
echo "Validating $file" | |
jq . "$file" > /dev/null 2>&1 | |
if [ $? -ne 0 ]; then | |
echo "Invalid JSON syntax in $file" | |
exit 1 | |
fi | |
echo "Successfully validated $file" | |
done |