diff --git a/src/schemas/json/github-workflow.json b/src/schemas/json/github-workflow.json index ae3199a76a9..861fe9c7aa9 100644 --- a/src/schemas/json/github-workflow.json +++ b/src/schemas/json/github-workflow.json @@ -1551,9 +1551,19 @@ }, "type": { "$comment": "https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callinput_idtype", - "description": "Required if input is defined for the on.workflow_call keyword. The value of this parameter is a string specifying the data type of the input. This must be one of: boolean, number, or string.", + "description": "Required if input is defined for the on.workflow_call keyword. The value of this parameter is a string specifying the data type of the input. This must be one of: boolean, number, string, or choice.", "type": "string", - "enum": ["boolean", "number", "string"] + "enum": ["boolean", "number", "string", "choice"] + }, + "options": { + "$comment": "https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onworkflow_callinput_idtype", + "description": "The options of the dropdown list, if the type is a choice.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 10 }, "default": { "$comment": "https://help.github.com/en/github/automating-your-workflow-with-github-actions/metadata-syntax-for-github-actions#inputsinput_iddefault", diff --git a/src/test/github-workflow/reusable-workflow.yaml b/src/test/github-workflow/reusable-workflow.yaml index 44d483cb829..6bd4b313ef4 100644 --- a/src/test/github-workflow/reusable-workflow.yaml +++ b/src/test/github-workflow/reusable-workflow.yaml @@ -19,6 +19,14 @@ on: type: number default: 0 required: false + deployment_env: + description: Target deployment environment + type: choice + required: true + options: + - development + - staging + - production jobs: build-and-publish: name: build and publish diff --git a/src/test/github-workflow/workflow_call_input_issue_2501.yaml b/src/test/github-workflow/workflow_call_input_issue_2501.yaml index 31d9c84136e..a4de7150d46 100644 --- a/src/test/github-workflow/workflow_call_input_issue_2501.yaml +++ b/src/test/github-workflow/workflow_call_input_issue_2501.yaml @@ -22,6 +22,14 @@ on: description: The directory in which to run terraform required: true type: string + deployment_environment: + description: Target deployment environment + required: true + type: choice + options: + - dev + - staging + - prod secrets: token: required: true