Skip to content

Improved Wiki

Improved Wiki #56

on:
pull_request:
branches:
- main
jobs:
validate:
name: Validate JSON Files against schemas
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate Category JSON
uses: dsanders11/[email protected]
with:
schema: ".schema/category.json"
files: "*/config.json"
- name: Validate Manufacturer JSON
uses: dsanders11/[email protected]
with:
schema: ".schema/manufacturer.json"
files: "*/*/config.json"
- name: Validate Controller JSON
uses: dsanders11/[email protected]
with:
schema: ".schema/controller.json"
files: "*/*/*/config.json"
- name: Send status
if: ${{ success() }}
run: |
curl --request POST \
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"context": "Validate JSON Files against schemas",
"state": "success",
"description": "JSON Files are valid",
"target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}'