backport-action
backport-action copied to clipboard
PRs created by backport-action should trigger the CI
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
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:
- checkout action using the
token
input so commits are pushed by the associated user (triggers apush
event, example) - backport action using the
github_token
input so the pull request is opened by the associated user (triggers apull_request
event, example) (this token is also used for any other interactions with GitHub by the action, e.g. commenting)
This example workflow uses both and this works well.