Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/schema-validation.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@
"foundryvtt-world-manifest.json",
"gaspar-1.0.json",
"gaspar-3.0.json",
"github-action.json",
"github-workflow.json",
"helmfile.json",
"hemtt-0.6.2.json",
"install.json",
Expand Down
84 changes: 56 additions & 28 deletions src/schemas/json/github-action.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,32 @@
},
"oneOf": [
{
"required": ["run", "shell"]
"anyOf": [
{
"not": {
"properties": {
"run": true
},
"required": ["run"]
}
},
{
"not": {
"properties": {
"shell": true
},
"required": ["shell"]
}
}
]
},
{
"required": ["uses"]
"not": {
"properties": {
"uses": true
},
"required": ["uses"]
}
}
],
"additionalProperties": false
Expand Down Expand Up @@ -278,7 +300,20 @@
"additionalProperties": false
}
},
"additionalProperties": false
"additionalProperties": false,
"dependencies": {
"runs": {
"type": "object",
"properties": {
"using": {
"not": {
"const": "composite"
}
}
},
"required": ["using"]
}
}
},
"outputs-composite": {
"$comment": "https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions",
Expand All @@ -305,23 +340,16 @@
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"else": {
"properties": {
"outputs": {
"$ref": "#/definitions/outputs"
}
}
},
"if": {
"properties": {
"runs": {
"properties": {
"using": {
"const": "composite"
}
"additionalProperties": false,
"dependencies": {
"runs": {
"type": "object",
"properties": {
"using": {
"const": "composite"
}
},
"required": ["using"]
}
}
}
Expand Down Expand Up @@ -379,7 +407,14 @@
"additionalProperties": false
},
"outputs": {
"$comment": "Because of `additionalProperties: false`, this empty schema is needed to allow the `outputs` property. The `outputs` subschema is determined by the if/then/else keywords."
"oneOf": [
{
"$ref": "#/definitions/outputs-composite"
},
{
"$ref": "#/definitions/outputs"
}
]
},
"runs": {
"oneOf": [
Expand Down Expand Up @@ -684,12 +719,5 @@
}
},
"required": ["name", "description", "runs"],
"then": {
"properties": {
"outputs": {
"$ref": "#/definitions/outputs-composite"
}
}
},
"type": "object"
}
Loading