Not able to manually trigger github actions workflow

I am not able to run my GitHub actions manually . using below

my code:

name: Package Manually
on:
  workflow_dispatch:
    inputs:
      name:
        description: 'run workflow'
        default: 'Run'

Github actions does not show any workflow with “Package Manually” name.

I have one more workflow which uses “push” as trigger and works fine .
please help

Is that the entire file? If so there’s nothing for it to do, no jobs, no steps.

The required field for inputs is mandatory:

inputs:
  name:
    description: 'run workflow'
    required: false
    default: 'Run'

Hi @shahsaurabh210,

Glad to see you in Github Community Forum!

Please put the event in default branch(master) workflow file.

Note:
If you put the workflow on the non-default branch, you need to create a same name **.yaml in default(master).

Thanks

I treid that but it’s still not giving me an option to trigger manually

Thankyou for your response.
for now I just want to manually trigger the workflow in a git branch (non-master) . is there a way ?

Hi @shahsaurabh210,

Thanks for your reply!

To manully trigger the workflow in a git branch(non-default), there are two options:

  1. You can set the branch to be default on repository settings.
  2. Or you need to create a same named .yaml in you default branch(both yamls with manual trigger), then you can choose the branch for manual trigger.
    image

Thanks

edit -fix typo.