cli: Trigger workflow with default boolean results in error: could not create workflow dispatch event: HTTP 422: Provided value '' for input 'debug' not in the list of allowed values
When triggering a GitHub Actions workflow that supports a default boolean, the CLI fails with the following error:
$ gh workflow run <workflow>
could not create workflow dispatch event: HTTP 422: Provided value '' for input 'debug' not in the list of allowed values (https://api.github.com/repos/HariSekhon/<repo>/actions/workflows/510171/dispatches)
The relevant workflow YAML section is:
on:
workflow_dispatch:
inputs:
debug:
type: boolean
required: false
default: false
$ gh version
gh version 2.5.1 (2022-02-15)
https://github.com/cli/cli/releases/tag/v2.5.1
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 14
- Comments: 19 (8 by maintainers)
Commits related to this issue
- gh does not support gh workflow run yet see https://github.com/cli/cli/issues/5246 — committed to elastic/apm-agent-java by v1v a year ago
- Revert "gh does not support gh workflow run yet see https://github.com/cli/cli/issues/5246" This reverts commit e7aa82da0f33b670c505a2721b3b712e81cb9fe1. — committed to v1v/apm-agent-java by v1v a year ago
Update: we’re still awaiting a platform fix for this. From what I can see, there is nothing wrong in the
inputs
payload that GitHub CLI sends (in fact,gh workflow run
examples above don’t even specify the value for the optional DEBUG input), but the platform still throws an error.@BioCarmen No updates in the thread usually means no updates from our end, sorry. Last time I checked, this was still a bug on the platform (it’s known and it’s being tracked internally).
@rainabba Unfortunately, this is still a bug on the platform. The workaround is to always supply values even for optional boolean fields.
This should now be fixed in production. Thank you for your patience.
No. The closest we have is the community forum: https://github.com/orgs/community/discussions/categories/api-and-webhooks
Thanks!