Skip to content

Added restriction on variant image #55

Added restriction on variant image

Added restriction on variant image #55

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/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: 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 }}"
}'