Fix schema with detached steps (#4066)

This commit is contained in:
xtex 2024-08-29 13:01:53 +00:00 committed by GitHub
parent 644f731327
commit e2a43e8467
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -227,7 +227,7 @@
}, },
"step": { "step": {
"description": "A step of your workflow executes either arbitrary commands or uses a plugin. Read more: https://woodpecker-ci.org/docs/usage/workflow-syntax#steps", "description": "A step of your workflow executes either arbitrary commands or uses a plugin. Read more: https://woodpecker-ci.org/docs/usage/workflow-syntax#steps",
"oneOf": [ "anyOf": [
{ {
"$ref": "#/definitions/commands_step" "$ref": "#/definitions/commands_step"
}, },
@ -240,7 +240,29 @@
"description": "Every step of your pipeline executes arbitrary commands inside a specified docker container. Read more: https://woodpecker-ci.org/docs/usage/workflow-syntax#steps", "description": "Every step of your pipeline executes arbitrary commands inside a specified docker container. Read more: https://woodpecker-ci.org/docs/usage/workflow-syntax#steps",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"required": ["image", "commands"], "required": ["image"],
"allOf": [
{
"if": {
"properties": {
"detach": {
"const": true
}
}
},
"then": {},
"else": {
"anyOf": [
{
"required": ["commands"]
},
{
"required": ["entrypoint"]
}
]
}
}
],
"properties": { "properties": {
"name": { "name": {
"description": "The name of the step. Can be used if using the array style steps list.", "description": "The name of the step. Can be used if using the array style steps list.",