Can’t trigger workflow manually

I’ve created a new flow with the manual trigger option:

name: Changelog-test

on: [workflow_dispatch]

jobs:
  greeting:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
      with:
        token: ${{ secrets.CI_AT }}
          
    # Notify community
    - name: Build changelog for Slack notification
      run: |
        npm i @actions/core conventional-changelog-cli -W
        npm run changelog:publish
        echo 'The changelog is: ' $VERSION_CHANGE_LOG

I’ve committed it to a side branch and created a PR.
I cannot see the workflow in the workflow list and cannot trigger it in any way.
Any idea why?

Probably the workflow needs to be present on master branch.

1 Like

Thanks. That explains it but… isn’t it quite missing the point?
I mean - I’d rather test my flow before I commit it to my primary branch…
Where does one submit feature requests to github? :wink:

@YonatanKra,

Yes, I can reproduce the same behavior.
If setup a workflow with the ‘workflow_dispatch’ event in a branch which is not the master branch or default branch, we can’t see the “Run workflow” button when we select this workflow on the ‘Actions’ tab.
Only when this workflow also exists in the master branch or default branch, we can see this button and can manually trigger the workflow.

Not sure if this is the designed behavior.
I have created an internal ticket to report this question to the appropriate engineering team for further discussion and evaluation. If they have any update, I will notify you in time, and sometimes the appropriate engineers may directly reply you here.

About feature requests, I recommend that you can directly report the feature requests 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.

@YonatanKra,

Only when this workflow also exists in the master branch or default branch, we can see this button and can manually trigger the workflow.

This is a designed behavior. You can see the following explanation in the docs here:

To trigger the workflow_dispatch event on GitHub, your workflow must be in the default branch.

If your projects really the workflow_dispatch event can work in other branches when the workflow is not in the default branch, as I mentioned about, you can directly report the feature requests here.