Skip to content

Commit

Permalink
Simple JSON validation
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Sep 26, 2024
1 parent dc27ab3 commit 45f5a5e
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=$(echo $JSON | nl | grep '"author": ""' | awk '{print $1}' | paste -s -d, -)
echo "## Empty author in lines:"
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 45f5a5e

Please sign in to comment.