Skip to content

Commit

Permalink
Merge pull request #55 from SenseException/website-schema
Browse files Browse the repository at this point in the history
Website JSON schema for .doctrine-project.json
  • Loading branch information
greg0ire authored Dec 10, 2024
2 parents 43ddb9b + d4e1cda commit 297a674
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/website-schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Website config validation"

on:
workflow_call:

jobs:
schema:
runs-on: "ubuntu-24.04"

steps:
- name: "Checkout code"
uses: "actions/checkout@v4"

- name: "Fetch JSON schema"
run: "wget https://www.doctrine-project.org/schema/website-schema.json --output-document website-schema.json"

- name: "Validate JSON schema"
run: "jsonschema website-schema.json --instance .doctrine-project.json"
21 changes: 21 additions & 0 deletions workflow-templates/website-schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

name: "Website config validation"

on:
pull_request:
branches:
- "*.x"
paths:
- ".doctrine-project.json"
- ".github/workflows/website-schema.yml"
push:
branches:
- "*.x"
paths:
- ".doctrine-project.json"
- ".github/workflows/website-schema.yml"

jobs:
json-validate:
name: "Validate JSON schema"
uses: "doctrine/.github/.github/workflows/website-schema.yml@use_a_valid_ref_here"

0 comments on commit 297a674

Please sign in to comment.