Skip to content

How to set a default value for a workflow_dispatch variable? #26322

Answered by wechuli
kaihendry asked this question in Actions
Discussion options

You must be logged in to vote

Unfortunately, this is not possible. There is no way for you to define inputs on a push event. The github.event.inputs context will contain key value pairs only if the workflow was triggered by a workflow_dispatch event.

docs.github.com

Events that trigger workflows - GitHub Docs

//docs.github.com/en/actions/reference/events-that-trigger-workflows

docs.github.com

Events that trigger workflows - GitHub Docs

//docs.github.com/en/actions/reference/events-that-trigger-workflows

Replies: 6 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@IanTaylor-catapult
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment