github / vscode-github-actions

GitHub Actions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions
MIT License
469 stars 70 forks source link

Choice input variable is not detected properly #318

Closed sebastianbuechler closed 2 months ago

sebastianbuechler commented 2 months ago

Describe the bug When I have input variables on a workflow everything works fine with type string but not with type choice: image

I get multiple errors:

To Reproduce Steps to reproduce the behavior:

  1. Create a new workflow file that has input variables
  2. Add an input variable of type choice
  3. See error

Expected behavior No error of the linter

Screenshots If applicable, add screenshots to help explain your problem.

Extension Version v0.26.2

sebastianbuechler commented 2 months ago

Edit: It seems that the choice type is not available for workflow_call at all: https://json.schemastore.org/github-workflow.json

Is there a reason for this?

muzimuzhi commented 2 months ago

choice type is only supported by inputs of on.workflow_dispatch event, not on.workflow_call.

on.workflow_call.inputs..type

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.

ghost commented 2 months ago

Obrigado!