Skip to content

Add comment to PR when done #21

Add comment to PR when done

Add comment to PR when done #21

on:
pull_request:
branches:
- main
name: Validate JSON
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Delete previous comment
uses: thollander/actions-comment-pull-request@v2.5.0
with:
comment_tag: validate_json
mode: delete
- 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
uses: thollander/actions-comment-pull-request@v2.5.0
with:
comment_tag: validate_json
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