Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRs open by automation don't trigger CI runs #324

Closed
viccuad opened this issue Oct 4, 2023 · 2 comments
Closed

PRs open by automation don't trigger CI runs #324

viccuad opened this issue Oct 4, 2023 · 2 comments
Labels
kind/bug Something isn't working kind/tech-debt

Comments

@viccuad
Copy link
Member

viccuad commented Oct 4, 2023

PRs such as:
#322
#308

Don't trigger CI runs for themselves.

The PRs get triggered by using peter-evans/repository-dispatch, see:
https://github.com/kubewarden/policy-server/blob/dbd4e8dc0283c13c842c371e86436c6f28f69dfb/.github/workflows/release.yml#L129C37-L132

Searching on the interwebs I reached:
https://github.com/orgs/community/discussions/25602
peter-evans/create-pull-request#48
summarized in:
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

Hence, we could implement one of the workarounds:

Workarounds to trigger further workflow runs

There are a number of workarounds with different pros and cons. The easiest being:

Use the default GITHUB_TOKEN and allow the action to create pull requests that have no checks enabled. Manually close pull requests and immediately reopen them. This will enable on: pull_request workflows to run and be added as checks. To prevent merging of pull requests without checks erroneously, use branch protection rules.

@viccuad
Copy link
Member Author

viccuad commented Apr 18, 2024

Cause:

Using GITHUB_TOKEN for workflow_runs doesn't trigger more workflow_runs:

When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by the GITHUB_TOKEN will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs. For example, if a workflow run pushes code using the repository's GITHUB_TOKEN, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.

Solution:

Configure updatecli to use personal token to trigger these PRs.
For example, the chimera-bot token in the following:
https://github.com/kubewarden/helm-charts/blob/main/.github/workflows/update-charts.yml#L229-L247
and
https://github.com/kubewarden/helm-charts/blob/main/.github/workflows/update-dependencies.yaml#L22-L23

@viccuad
Copy link
Member Author

viccuad commented Oct 28, 2024

This is fixed and not happening anymore.

@viccuad viccuad closed this as completed Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working kind/tech-debt
Projects
None yet
Development

No branches or pull requests

2 participants