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

Trigger GitHub Actions on automatic PRs opened by GitHub Actions #3635

Closed
porunov opened this issue Feb 28, 2023 · 2 comments · Fixed by #3846
Closed

Trigger GitHub Actions on automatic PRs opened by GitHub Actions #3635

porunov opened this issue Feb 28, 2023 · 2 comments · Fixed by #3846
Assignees

Comments

@porunov
Copy link
Member

porunov commented Feb 28, 2023

Automatic backporting PRs which are opened by GitHub Actions are not triggering the GitHub Actions CI.
An example PR: #3633
The issue and the solution is most likely defined here: https://github.com/orgs/community/discussions/25602

@FlorianHockmann
Copy link
Member

I just found sorenlouv/backport-github-action#79 where the same issue is discussed specifically for the backport action.
I think creating a new user for this and then using a personal access token from that user for the action as suggested in this comment on that issue is the best workaround for us right now.
I'll try that out.

@FlorianHockmann FlorianHockmann self-assigned this Mar 1, 2023
@porunov
Copy link
Member Author

porunov commented Mar 1, 2023

I just found sqren/backport-github-action#79 where the same issue is discussed specifically for the backport action. I think creating a new user for this and then using a personal access token from that user for the action as suggested in this comment on that issue is the best workaround for us right now. I'll try that out.

Sounds good! That said, We have janusgraph-bot and I believe @mbrukman should have access to that bot. Maybe we could reuse that bot for this purpose as well. I.e. create PAT for janusgraph-bot. Nevertheless, using another user is good as well.

FlorianHockmann added a commit to GDATASoftwareAG/janusgraph that referenced this issue Jun 21, 2023
We need to use a PAT (personal access token) instead of the default
`GITHUB_TOKEN` as that doesn't trigger any workflow runs by design:

> When you use the repository's GITHUB_TOKEN to perform tasks, events
> triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch
> and repository_dispatch, will not create a new workflow run. This
> prevents you from accidentally creating recursive workflow runs.

Source: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow

The PAT used here is from our new bot: https://github.com/janusgraph-automations
So that should become the author of backporting PRs from now on.

This fixes JanusGraph#3635

Signed-off-by: Florian Hockmann <[email protected]>
FlorianHockmann added a commit that referenced this issue Jun 23, 2023
We need to use a PAT (personal access token) instead of the default
`GITHUB_TOKEN` as that doesn't trigger any workflow runs by design:

> When you use the repository's GITHUB_TOKEN to perform tasks, events
> triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch
> and repository_dispatch, will not create a new workflow run. This
> prevents you from accidentally creating recursive workflow runs.

Source: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow

The PAT used here is from our new bot: https://github.com/janusgraph-automations
So that should become the author of backporting PRs from now on.

This fixes #3635

Signed-off-by: Florian Hockmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants