Workflow_dispatch workflow not showing in actions tab

I faced this issue as well. My workflow that listens only to the workflow_dispatch event is in master. I pushed it there directly without intermediate feature branch. The workflow isn’t detected by Github and doesn’t show up in Actions tab. I tried calling API endpoint for that, but it didn’t work either: API responds with 404 error:

{
    "message": "Not Found",
    "documentation_url": "https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event"
}

This feature is totally unusable. I cannot play with the workflow because these changes will be saved forever in Git history.

Thanks for reporting this issue. I’ve just ran into this and been debugging it for a couple of hours now. Could you share some info about the ticket? @brightran

Not sure this will help anyone, but we ran into this because we had an environment variable with a value that wasn’t quoted. The workflow is set up to run on workflow_dispatch as well as on schedule. We also used to have it run on repository_dispatch before we changed it to workflow_dispatch. No issues with this until workflow dispatch. Neither the UI nor the API endpoint to trigger a workflow dispatch event worked. Quoting the value fixed it.

Before:

env:
  SOME_ENV_VAR: 2020-01-01

After:

env:
  SOME_ENV_VAR: "2020-01-01"

Has this issue been updated? I am trying to use workflow_dispatch but a button is not showing when I go to the actions tab.

I am having the same problem. Has this issue been fixed yet?

Adding my own 2 cents here:

As of April 28th 2021, I also experienced issues with a) visibility of the workflow & mini-UI-Web-form. I also don’t get the UI mini-form to enter field values. I ended up using GH CLI and managed to trigger a workflow_dispatch-type workspace specifying my custom fields.

First try with the CLI failed:

$ gh workflow run build.yml -f logLevel=warning -f usdArtefactPrefix=fake-usd -f usdBuildVersion=v21.02 -f usdBuildType=Debug
could not create workflow dispatch event: HTTP 422: Workflow does not have 'workflow_dispatch' trigger (https://api.github.com/repos/shotgunsoftware/oam/actions/workflows/8578001/dispatches)

But then worked when specifying by DEV branch:

$ gh workflow run build.yml --ref dev/some/branch_name -f logLevel=warning -f usdArtefactPrefix=fake-usd -f usdBuildVersion=v21.02 -f usdBuildType=Debug 
✓ Created workflow_dispatch event for build_usd.yml at dev/some/branch_name
To see runs for this workflow, try: gh run list --workflow=build.yml

I took the same approach as @nmontmarquette, and the workflow showed as successfully submitted, i.e., the same as the snippet in @nmontmarquette’s post. However, when I run gh run list as the CLI suggests after submitted the workflow, the runs never appear.

Is there a feature request or issue somewhere where I can add my vote to getting this included in the UI?
The REST API workaround requiring personal access tokens is really unpleasant.

Any update on this? This is clearly broken as described, just adding ‘repository_dispatch’ to the job does absolutely nothing for me. Makes the feature I just built quite useless, would appreciate a fix.

Is there any update on this matter?

I have created a configuration shipper in order to have a single source of truth for the workflows in all the services involved in my infrastructure, but some of them are detected, meanwhile others are not.

This is clearly a bug, since it can be solved by renaming the file, creating a new simple workflow and copying the contents from the automatically created one, etc… But that actually destroys the logic of having the workflows shipped and automatically configured.

For the record I tried these steps:

  1. changed the type on: push
  2. pushed on a non default branch, should work with any
  3. run the workflow one time to “keep it up”: deleting the workflow build also the workflow disappear
    if pass to step 4
  4. changed back to workflow_dispatch

At this point the workflow is still there but when I select the run and then “View workflow file” it’s still with the push event (cache issue?).
So I use REST API and run the job from command line and it runs.
If I select again “View workflow file” it is the correct one, but still can’t get the button to run it manually from GitHub.

Any update on this? I am still seeing this issue

I was having the same issue, i thought for hours i was doing something wrong in code lol.
Well after trying for hours, i got it work after creating a workflow_dispatch at main and then doing a PR to my X branch. And running the workflow manually once by selecting X branch during manual run.

After that any edits at X workflow file just kept updating at actons tab.

So when will it get fixed?

I experienced something similar. It seems that GHA doesn’t “notice” workflow_dispatch for a workflow file until it has been merged into the main branch, so if you’re adding it in a working branch you can’t use it until you merge your first PR. Very frustrating, and also very confusing at first until I got it working - because there’s nothing that tells you it will work after you merge to the main branch, so it looks like it just isn’t working at all, and you don’t want to merge yet because you still thing something is wrong.

I have the same issue ._… Does someone have an update about it?

I have got the same issue
Any update?

Hitting the same problem at Actions · paslandau/docker-php-tutorial · GitHub configured via docker-php-tutorial/ci.yml at be7927186b7ef855053f8f9bd46b5915cf83e43d · paslandau/docker-php-tutorial · GitHub

The issue doesn’t seem to be fixed yet.

I encountered the same issue now. :frowning:
It seems that a syntax issue in the workflow may lead to the issue reported in this thread.
In my case I defined the “required” property for input type “boolean” and removing the “required” property from it resolved it.

Is there any way to promote this thread or there is a related issue we can push up?

1 Like

As of today if you create a workflow file manually on your machine or through GitHub interface it doesn’t matter. If you want to use the workflow_dispatch trigger it will only work on the main branch if you commit it to a separate branch (any non default branch) it will not show.