Mirror of space-wizards/json-schema-validator
Find a file
2021-03-11 11:57:37 -06:00
.gitignore Initial commit 2020-08-07 16:04:05 +07:00
action.yml Changes to publish 2021-03-11 11:57:37 -06:00
Dockerfile Initial commit 2020-08-07 16:04:05 +07:00
entrypoint.sh Initial commit 2020-08-07 16:04:05 +07:00
README.md Update readme 2021-03-11 11:56:41 -06:00
utils.py Handle deleted files, reduce unnecessary prints 2021-03-10 14:21:06 -06:00
validate.py Initial commit 2020-08-07 16:04:05 +07:00

RSI Validator

A Github Action for validating RSI metadata for Space Station 14. Forked from snapcart/json-schema-validator.

How to use it?

Create .github/workflows/<workflow_name>.yml

on:
  pull_request:
    branches:
      - master
name: Pull request workflow
jobs:
  validate_configurations:
    name: Validate configurations
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Validate BigQuery schema
        uses: space-wizards/json-schema-validator@v1.0.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          json_schema: ./schemas/bigquery_schema.schema
          json_path_pattern: .*bigquery_schema.json$
          send_comment: true
          clear_comments: true
      - name: Validate other schema
        uses: space-wizards/json-schema-validator@v1.0.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          json_schema: ./schemas/other_schema.schema
          json_path_pattern: .*other_schema.json$
Inputs Required Default Description
token Yes - GitHub token to access pull request details. GitHub provides one here ${{ secrets.GITHUB_TOKEN }}
json_schema Yes - Path to the JSON Schema to validate with
json_path_pattern Yes - Path to JSON files in RegEx
send_comment No False Create a comment containing validation errors
clear_comments No False Clear previous error comment(s)