Skip to content

Added document generation on PR #31

Added document generation on PR

Added document generation on PR #31

on:
pull_request:
branches:
- main
name: Validate JSON
jobs:
validate:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Delete previous comment
uses: izhangzhihao/delete-comment@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
delete_user_name: github-actions[bot]
issue_number: ${{ github.event.number }}
- uses: actions/checkout@v3
- name: Validate Category JSON
uses: dsanders11/json-schema-validate-action@v1.1.0
with:
schema: ".schema/category.json"
files: "*/config.json"
- name: Validate Manufacturer JSON
uses: dsanders11/json-schema-validate-action@v1.1.0
with:
schema: ".schema/manufacturer.json"
files: "*/*/config.json"
- name: Validate Controller JSON
uses: dsanders11/json-schema-validate-action@v1.1.0
with:
schema: ".schema/controller.json"
files: "*/*/*/config.json"
- name: Comment PR
if: failure()
uses: thollander/actions-comment-pull-request@v2.5.0
with:
message: |
Validation of the JSON files has failed, please check the [Github Action log](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) to see why