korthout / backport-action

Fast and flexible GitHub action to cherry-pick merged pull requests to selected branches
MIT License
57 stars 23 forks source link

PRs created by backport-action should trigger the CI #379

Open grische opened 11 months ago

grische commented 11 months ago

Is your feature request related to a problem? Please describe. PRs created by the backport-action do not trigger the CI for the PR. Triggering the CI, especially for backports, is important to verify the integrity of the PR.

Describe the solution you'd like I do not know of a good solution on how to achieve that, but for starters, an entry in the README outlining examples on how to overcome this, would be great.

Describe alternatives you've considered See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

korthout commented 11 months ago

That's a good point. Thanks for raising this @grische

By default, backport-action uses the GITHUB_TOKEN which does not create new workflow runs for the events it triggers. You can use a Personal Access Token instead of the default GITHUB_TOKEN. I'll consider adding something about this to the README.

For backport-action, there are several events triggered. So, the solution depends on the type of event your workflow runs on. You can use a Personal Access Token and set it in the workflow for the:

This example workflow uses both and this works well.