github-action icon indicating copy to clipboard operation
github-action copied to clipboard

Subsequent pushes to existing PR/branch lead to stuck PR actions

Open Yserz opened this issue 4 years ago • 5 comments

Describe the bug When a fresh PR/branch is created by the action it seems to use the provided GITHUB_TOKEN so the owner of the token is displayed as creator of the PR. When an update to this PR is pushed from the action it seems it uses the default github.token and github-actions is the creator of the push. This seems to not allow to run other actions on the updated PR (I suspect to prevent infinite loops). Here's an example: https://github.com/wireapp/wire-webapp/pull/9696.

To Reproduce Steps to reproduce the behavior:

  1. Change the translations files in order to create a new PR/branch with the action (creator will be otto-the-bot and other actions are running through)
  2. Add another change and trigger the action (push is created by github-actions)
  3. Other actions running on this PR are stuck and never complete.

Expected behavior Subsequent pushes are created from otto-the-bot instead of github-actions

Yserz avatar Sep 24 '20 14:09 Yserz

https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token

Yserz avatar Sep 15 '21 19:09 Yserz

we're also having this problem. in our case it's really annoying because we're running the action to create the PR with a cron job. every time the job runs and there is already a PR all the checks get invalidated and don't run again. (because the action also force pushes when translation have not changed.)

would be really nice if this gets fixed soon 🙏

ottosuess avatar Apr 19 '22 09:04 ottosuess

how is this issue related to parallel runs?

has this been fixed?

ottosuess avatar Oct 18 '22 09:10 ottosuess

@ottosuess my apologies, closed it by mistake

andrii-bodnar avatar Oct 18 '22 12:10 andrii-bodnar

@ottosuess do you have some ideas on how this issue might be fixed? Are there any alternative solutions or features you've considered?

andrii-bodnar avatar Oct 18 '22 12:10 andrii-bodnar

We're having the same issue. We used auto update with kodiak. When that happens, checks start running again. But minutes later the crowdin action force pushes and the checks gets cancelled.

zomars avatar Jan 12 '23 22:01 zomars

Even setting a workflow_run as trigger doesn't trigger the checks as described in the docs.

zomars avatar Jan 12 '23 22:01 zomars

Thanks @zomars we'll check this.

DimaYashchyshyn avatar Jan 12 '23 22:01 DimaYashchyshyn

Here's an example https://github.com/calcom/cal.com/pull/6444

EDIT:

You can see that required-checks is expected but never run. When the commit comes from kodiak it starts running.

image

But after a minute it gets overridden by crowdin and the checks are cancelled.

zomars avatar Jan 12 '23 22:01 zomars

Hi all Please see this comment by me on https://github.com/crowdin/github-action/issues/142#issuecomment-1773770133

wojsmol avatar Oct 21 '23 12:10 wojsmol