Can't trigger workflow manually #25756
-
I just saw this blog post. Thank you for implementing this feature. The GitHub BlogGitHub Actions: Manual triggers with workflow_dispatch The GitHub BlogGitHub Actions: Manual triggers with workflow_dispatch I changed an existing workflow in a branch to have the workflow_dispatch trigger event. After I got the syntax right, I found I couldn’t see the “Run workflow” button shown in the blog. So I tried a few things to try to get it to show up, such as renaming the workflow file to “generate_license_activation.yaml” and merging it into the base branch. However, the workflow does not show up in the list, so there’s no way to check for the existence of the “Run workflow” button. The repository is private, but there’s no secret sauce to the workflow file. .github/workflows/generate_license_activation.yaml
Is there something I need to do to tell GitHub of the existence of this workflow or something? |
Beta Was this translation helpful? Give feedback.
Replies: 21 comments 4 replies
-
According to your Workflows screenshot, you chose “All workflows”. Please click on the name of your workflow which with |
Beta Was this translation helpful? Give feedback.
-
Hi thanks for responding, I clicked the wrong entry in my screenshot, but the “Run workflow” button doesn’t appear there. Maybe if I rename the workflow it will show up as a new entry in the Workflows list and I can click Run workflow then. I’ll try that soon. But it seems like possibly there’s a defect where if you modify an existing workflow to be a “workflow_dispatch” triggered one, you can’t run it manually? I don’t know if this is intended. |
Beta Was this translation helpful? Give feedback.
-
I renamed the workflow and committed it to a branch, but it doesn’t show up anywhere in the GitHub actions UI. Then I merged into my main branch (equivalent of master) and the name of the existing workflow changed, but there is still no “Run workflow” button I turned off my Github Dark user style just to confirm it’s not interfering with anything, so that’s why the screenshots in this post look different. Edit, here is my latest attempt: I created a new file with a slightly different workflow name. I also checked my billing settings and made sure I still had capacity (so far I have 0 minutes/ storage used) .github/workflows/new_unity_license_activation.yaml
So I guess it isn’t the fact that the workflow existed with a different trigger before, since this is a new file… is there something wrong with the syntax of my workflow that GitHub is not telling me? Do I have to opt in to something for the button to show up? Another edit: made a simple build to eliminate any problems with the actions libraries I’m using. .github/workflows/test_manual.yaml
Still no button Hopefully it’s something simple I’m doing wrong |
Beta Was this translation helpful? Give feedback.
-
I tried your examples in my side, the workflow_dispatch event is recognized in Actions tab. My default branch is master . And I created a new workflow with your snippet on master . What’s your default branch? Please make sure the workflow yaml file on default branch has on: workflow_dispatch event. |
Beta Was this translation helpful? Give feedback.
-
Yup, my default branch is “dev”, and the workflow code I posted is in “dev”. No “run workflow” button |
Beta Was this translation helpful? Give feedback.
-
I created a public minimal reproduction. https://github.com/dogboydog/manual-workflow-test The “Run workflow” button is still not there. If there is something wrong with the syntax of the action, GitHub should ideally show some indication of that. Anything else to try? |
Beta Was this translation helpful? Give feedback.
-
Thank you for the repro. There seems to be a character in front of the Could you try to merge this PR dogboydog/manual-workflow-test#1 and then try again? |
Beta Was this translation helpful? Give feedback.
-
And yes, that seems to be a bug in our parser, we should report that error. I’ll file an issue for us to take a look 🙇♂️♂ |
Beta Was this translation helpful? Give feedback.
-
Ah! Right on. That did it. Thank you! |
Beta Was this translation helpful? Give feedback.
-
I’ve got a similar problem after trying to enable
I don’t require any input parameters and the |
Beta Was this translation helpful? Give feedback.
-
I have the same problem in my repo (private one) where I have several workflows where I added the new |
Beta Was this translation helpful? Give feedback.
-
I don’t have permissions to your repo so it wouldn’t show up for me but I’ve forked the repo and it shows up just fine: Are you on this view? |
Beta Was this translation helpful? Give feedback.
-
I am experiencing a similar problem. Concerning new Repos everything works great, all of the event combos. But for existing repositories, the Here is a link to a sandbox repo showing this problem - https://github.com/munderseth/my.dispatch/actions. Refer to the I also forked the repo mentioned above - https://github.com/munderseth/cake-docker/actions. The workflow is not displayed. |
Beta Was this translation helpful? Give feedback.
-
Yes, from that view I do not see the button: |
Beta Was this translation helpful? Give feedback.
-
@gitfool @munderseth Thanks for reporting this. We’ve identified the issue and are going to fix it soon. |
Beta Was this translation helpful? Give feedback.
-
@cschleiden I guess I might have the same issue but you couldn’t check because I am using a private repo and (even) did not leave the link to the repo. Is there any way you can check what’s going on in my repo? Thanks. |
Beta Was this translation helpful? Give feedback.
-
The fix has now been deployed. |
Beta Was this translation helpful? Give feedback.
-
Hi @cschleiden thanks for the fix. I have confirmed it works for me concerning the repo I shared. But I have another private repo using multiple workflows. On a branch, I added the name: tests on: push: workflow_dispatch: jobs: project1: runs-on: ubuntu-latest steps: |
Beta Was this translation helpful? Give feedback.
-
The workflow needs to be in the default branch: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#manually-running-a-workflow |
Beta Was this translation helpful? Give feedback.
-
Hello everybody, did someone have the following issue, that I currently have. I have a simple workflow with workflow_dispatch, so that I can trigger the action manually. The workflow is submitted in the default ("main") branch and while I can trigger it on "main", I needed to trigger it on different branch. I thought, ok that other branch is older than "main", it does not have the workflow, so I submitted the same workflow with the same name in the second branch as well. But the result is the same - still getting the same error. Do you have explanation for that? BR, |
Beta Was this translation helpful? Give feedback.
-
I have the same problem as @ilhan007 gh version 2.30 I have added a few run steps to a workflow and attempted to run it from that branch. I can't run the workflow from the branch even though it definitely has a workflow_dispatch trigger and always has had that trigger. Edit: I agree with @spex66 this started happening after running it from the gh cli, and then attempting to run it from the UI, although now neither one works and both throw the error. Edit: "removed 'used to work' |
Beta Was this translation helpful? Give feedback.
Thank you for the repro. There seems to be a character in front of the
name
:Could you try to merge this PR dogboydog/manual-workflow-test#1 and then try again?