fix pipeline schema to support branch as an array in 'when' (#836)

This commit is contained in:
eleith 2022-03-09 06:49:06 -08:00 committed by GitHub
parent 8fa2a5efe4
commit e0d8d13a91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View file

@ -6,6 +6,13 @@ pipeline:
when:
branch: master
when-branch-array:
image: alpine
commands:
- echo "test"
when:
branch: [master, deploy]
when-event:
image: alpine
commands:

View file

@ -200,7 +200,16 @@
},
"branch": {
"description": "TODO Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#branch",
"type": "string"
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
},
"minLength": 1
},
{ "type": "string" }
]
},
"event": {
"description": "TODO Read more: https://woodpecker-ci.org/docs/usage/pipeline-syntax#event",