Workflow Dispatch from a tag in actions tab

Hi there,

According to rest api documentation, workflow_dispatch takes in a ref

ref Required . The reference of the workflow run. The reference can be a branch, tag, or a commit SHA.

However, the UI only provides branch as the option. Is there anyway we can add tags?

Thanks!

1 Like

@wei ,

When trying to manually trigger a workflow on the workflow_dispatch event, there are some differences between triggering from GitHub and triggering using the REST API.

  1. To trigger the workflow_dispatch event on GitHub, your workflow must be in the default branch, otherwise you can’t see the “Run workflow” button on GitHub. If you want other branches can be the optional ref of the workflow, the workflow also must be in these branches. Currently, the optional ref only can be branch. Tag and commit SHA are not supported here.

  2. To trigger the workflow_dispatch event using the REST API, your workflow does not have to be in the default branch as long as the workflow is in the optional ref (branch, tag, or a commit SHA).

If you really need the feature that can select branch, tag or commit SHA as ref when triggering the workflow_dispatch event on GitHub, I recommend that you can directly report a feature request here.
That will allow you to directly interact with the appropriate engineering team, and make it more convenient for the engineering team to collect and categorize your suggestions.