File tree Expand file tree Collapse file tree 4 files changed +809
-4
lines changed Expand file tree Collapse file tree 4 files changed +809
-4
lines changed Original file line number Diff line number Diff line change 56
56
with :
57
57
script : |
58
58
core.setFailed('website/versioned_docs has changed. Instead you need to update the docs in the website/docs folder.')
59
+ check_schema :
60
+ runs-on : ubuntu-latest
61
+ steps :
62
+ - uses : actions/checkout@v4
63
+ - name : Get changed files in the docs folder
64
+ id : changed-files-specific
65
+ uses : tj-actions/changed-files@v46
66
+ with :
67
+ files : |
68
+ website/static/schema.json
69
+ website/static/schema-taskrc.json
70
+ - uses : actions/github-script@v7
71
+ if : steps.changed-files-specific.outputs.any_changed == 'true'
72
+ with :
73
+ script : |
74
+ core.setFailed('schema.json or schema-taskrc.json has changed. Instead you need to update next-schema.json or next-schema-taskrc.json.')
Original file line number Diff line number Diff line change @@ -16,10 +16,14 @@ import (
16
16
)
17
17
18
18
const (
19
- changelogSource = "CHANGELOG.md"
20
- changelogTarget = "website/docs/changelog.mdx"
21
- docsSource = "website/docs"
22
- docsTarget = "website/versioned_docs/version-latest"
19
+ changelogSource = "CHANGELOG.md"
20
+ changelogTarget = "website/docs/changelog.mdx"
21
+ docsSource = "website/docs"
22
+ docsTarget = "website/versioned_docs/version-latest"
23
+ schemaSource = "website/static/next-schema.json"
24
+ schemaTarget = "website/static/schema.json"
25
+ schemaTaskrcSource = "website/static/next-schema-taskrc.json"
26
+ schemaTaskrcTarget = "website/static/schema-taskrc.json"
23
27
)
24
28
25
29
var (
@@ -83,6 +87,10 @@ func release() error {
83
87
return err
84
88
}
85
89
90
+ if err := schema (); err != nil {
91
+ return err
92
+ }
93
+
86
94
return nil
87
95
}
88
96
@@ -175,3 +183,13 @@ func docs() error {
175
183
}
176
184
return nil
177
185
}
186
+
187
+ func schema () error {
188
+ if err := copy .Copy (schemaSource , schemaTarget ); err != nil {
189
+ return err
190
+ }
191
+ if err := copy .Copy (schemaTaskrcSource , schemaTaskrcTarget ); err != nil {
192
+ return err
193
+ }
194
+ return nil
195
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "$schema" : " http://json-schema.org/draft-07/schema" ,
3
+ "title" : " Taskrc YAML Schema" ,
4
+ "description" : " Schema for .taskrc files." ,
5
+ "type" : " object" ,
6
+ "properties" : {
7
+ "experiments" : {
8
+ "type" : " object" ,
9
+ "additionalProperties" : {
10
+ "type" : " integer"
11
+ }
12
+ }
13
+ },
14
+ "additionalProperties" : false
15
+ }
You can’t perform that action at this time.
0 commit comments