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: 7 comments 3 replies

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

Comment options

You must be logged in to vote
2 replies
@ifeomaro
Comment options

@ndom91
Comment options

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