Push doesn't trigger workflow action in an open PR #25332
-
Hi guys, I’m trying to get accustomed to GitHub actions. Probably I’m missing something obvious. I have two workflows, one called
Now, in an open PR (to master), when I push any changes to the relevant branch, both Then, the latter commits changes and pushes to the same branch (within the action). However, this latter push doesn’t trigger the I have a very basic example here: amete/hello_world#6 Why doesn’t the last commit/push trigger the Many thanks. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @amete, Glad to see you in Github Community Forum! This is by designed. The latter commit is pushed within an action. There is a limitation of workflow: An action in a workflow run can’t trigger a new workflow run When you use GITHUB_TOKEN in your actions, all of the interactions with the repository are on behalf of the Github-actions bot. The operations act by Github-actions bot cannot trigger a new workflow run. As an alternative, you can create a personal access token, and use it to create an encrypted secret, use the secret instead of GITHUB_TOKEN for the action. Please check similar ticket for the details. Thanks |
Beta Was this translation helpful? Give feedback.
-
weide-zhou:
Thanks @weide-zhou, that’s really useful! |
Beta Was this translation helpful? Give feedback.
Hi @amete,
Glad to see you in Github Community Forum!
This is by designed. The latter commit is pushed within an action. There is a limitation of workflow: An action in a workflow run can’t trigger a new workflow run
When you use GITHUB_TOKEN in your actions, all of the interactions with the repository are on behalf of the Github-actions bot. The operations act by Github-actions bot cannot trigger a new workflow run.
As an alternative, you can create a personal access token, and use it to create an encrypted secret, use the secret instead of GITHUB_TOKEN for the action. Please check similar ticket for the details.
Thanks