Skip to content

Commit d4e1cda

Browse files
Create website-schema workflow
Create json schema for website config Outsource website-schema.json to doctrine website Use long option in commands Run workflow on Ubuntu 24.04 Create website-schema template
1 parent f3b0de6 commit d4e1cda

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/website-schema.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Website config validation"
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
schema:
8+
runs-on: "ubuntu-24.04"
9+
10+
steps:
11+
- name: "Checkout code"
12+
uses: "actions/checkout@v4"
13+
14+
- name: "Fetch JSON schema"
15+
run: "wget https://www.doctrine-project.org/schema/website-schema.json --output-document website-schema.json"
16+
17+
- name: "Validate JSON schema"
18+
run: "jsonschema website-schema.json --instance .doctrine-project.json"

workflow-templates/website-schema.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
name: "Website config validation"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "*.x"
8+
paths:
9+
- ".doctrine-project.json"
10+
- ".github/workflows/website-schema.yml"
11+
push:
12+
branches:
13+
- "*.x"
14+
paths:
15+
- ".doctrine-project.json"
16+
- ".github/workflows/website-schema.yml"
17+
18+
jobs:
19+
json-validate:
20+
name: "Validate JSON schema"
21+
uses: "doctrine/.github/.github/workflows/website-schema.yml@use_a_valid_ref_here"

0 commit comments

Comments
 (0)