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

Action doesn't complete even if triggered workflow finished successfully #49

Closed Alexander-Betz closed 2 years ago

Alexander-Betz commented 2 years ago

Since yesterday I have the problem that the latest version v1.6.0 can trigger another workflow but the action doesn't get the triggered workflow run and so it runs forever:

Getting workflow runs using query: event=workflow_dispatch&created=>=2022-04-13T13:21:14+00:00&actor=&per_page=100
Triggering workflow:
  workflows/test_called.yml/dispatches
  {"ref":"main","inputs":{
  "Test_input": "Test_value"
}}
Sleeping for 10 seconds
Getting workflow runs using query: event=workflow_dispatch&created=>=2022-04-13T13:21:14+00:00&actor=&per_page=100
Sleeping for 10 seconds
Getting workflow runs using query: event=workflow_dispatch&created=>=2022-04-13T13:21:14+00:00&actor=&per_page=100
Sleeping for 10 seconds
...

I verified the other workflow was triggered after the timestamp and it also finished successfully. I used the action as follows:

- uses: convictional/trigger-workflow-and-wait@v1.6.0
  with:
    owner: my_org
    repo: my_repo
    github_token: ${{ secrets.MY_PAT }}
    workflow_file_name: test_called.yml
    client_payload: '{"Test_input": "Test_value"}'

Any idea why this happens and am I the only one with this problem? I reverted back to v1.3.0 for now which works fine.

saurabh-paystack commented 2 years ago

Seems to be related to issue here.

BillKalaitzis commented 2 years ago

Hey @Alexander-Betz,

Since Monday 11/04/2022 at 09.00 UTC, one of GitHub's API endpoints that's used by this action is encountering problems with its filtering function. I've contacted GitHub a couple of days ago and they've verified that the issue is there and that a fix is on the way.

While waiting for the fix, I've created the following fork: https://github.com/BillKalaitzis/trigger-workflow-and-wait The fork performs the API result filtering locally, so it works around the aforementioned problem. You could try switching temporarily to the forked action (BillKalaitzis/trigger-workflow-and-wait@v1.6.1) until GitHub resolves the actual issue.

NotNils commented 2 years ago

I'm still seeing this issue with github api

rtrompier commented 2 years ago

The Github API issue is now fixed ;)

image

danieljgp2 commented 2 years ago

Im currently using the 1.6.3 and 1.6.1 version and both still having the same issue, i have the eternal 10 secs running over and over again