diff --git a/.github/workflows/website-schema.yml b/.github/workflows/website-schema.yml new file mode 100644 index 0000000..09d4b1d --- /dev/null +++ b/.github/workflows/website-schema.yml @@ -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" diff --git a/workflow-templates/website-schema.yml b/workflow-templates/website-schema.yml new file mode 100644 index 0000000..ce2b4c6 --- /dev/null +++ b/workflow-templates/website-schema.yml @@ -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"