convictional / trigger-workflow-and-wait

Trigger a workflow in another (or same) repository and wait for the job to finish.
MIT License
311 stars 151 forks source link

The requested URL returned error: 404 #62

Open IvanKravchenko773 opened 1 year ago

IvanKravchenko773 commented 1 year ago

Hi, I tying to trigger workflow but not in the main branch and it wont work. I used Argument (ref:) with name of branch but always get 404 error. Am I doing something wrong? image

image

rabih commented 1 year ago

The only thing that comes to mind is the private key you are connecting with does not have access to that repository or that the workflow path is incorrect. "workflows/test3.yml/dispatches" doesn't seem like a proper path.

tommoyang commented 1 year ago

I was running into this error myself despite using the same setup in other repositories fine - turns out that it's expecting that a workflow exists before the API calls will start working. I manually triggered a workflow run, and then this action started working

AshwinNmbr commented 1 year ago

@IvanKravchenko773 Did you find a solution? I am facing the same exact error too :(

IvanKravchenko773 commented 1 year ago

@AshwinNmbr no, but I think it just cant work if yml file is not in main branch.

AshwinNmbr commented 1 year ago

I managed to fix it by giving PAT in the args

Davide-DD commented 1 year ago

Hi everyone, I'm having the exact same problem: I'm trying to execute a workflow in an organization repo (where I'm the owner) but I cannot make it work. I'm specifying both the token and the workflow file name (and also owner and repository path like organization_name/repo_name). @AshwinNmbr what do you mean by "giving PAT in the args"? The github_token?

Davide-DD commented 1 year ago

In my case I had a repo with master branch and the other with main branch, so I had to specify "ref" in order to make it work

scottdickerson commented 1 year ago

does anyone know which specific permissions are needed by the PAT? Is it possible to grant these permissions to the OOTB GITHUB_TOKEN?

stormeye2000 commented 1 year ago

I had the same problem, api failed 404 So i made sure that the demo worked here And then I added my specific action jobs to the called action It looks like the sleep commands solved it ` steps:

anupkumardh commented 1 year ago

Had the same issue was forgot to add the user to the repo

littlix commented 9 months ago

For people who are as dumb as I - if you're doing this in a repo you've created in an organisation, the owner is the organisation, not yourself 💀

radnov commented 9 months ago

I encountered this error today and after a few hours of scratching my head I realised I was setting an environment variable named API_URL in a previous job step, which was picked up by this action here. 🤦

Not that this is a bug, but using such general environment variable names with parameter expansion in public facing scripts is bound to lead to mishaps like this.

brianjmurrell commented 4 months ago

does anyone know which specific permissions are needed by the PAT? Is it possible to grant these permissions to the OOTB GITHUB_TOKEN?

Did you find an answer to either (or both!) of these questions? The README is light (read: absent) of any details about the scopes needed on the PAT.