Per https://help.github.com/en/articles/events-that-trigger-workflows, workflows cannot trigger other workflow runs when using GITHUB_TOKEN:
> An action in a workflow run can't trigger a new workflow run. For example, if an action 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.
I'm curious if this is a temporary limitation, and if this will be removed in the future. I can understand the reasoning for it, but it's limiting for certain types of things that can be automated.
One example is using the deployments API with Actions. I'd like to build one workflow that handles `/deploy` comments in PR's to create GitHub Deployments, and then have another workflow that handles them. As of right now, that's not possible if the workflow that creates the deployment uses GITHUB_TOKEN.
The only way to work around this right now is the either 1) create a bot user and use a personal access token or 2) create a github app. Both of these are cumbersome, and suck for various reasons.
The documented limitation is still in place. However, as we look at other scenarios specifically around continuous deployment we will likely adjust this behavior for specific scenarios.
I've fallen back to using a custom auth token (linked to a bot account), which will trigger the checks on commit/push.
My use case is automatically creating a PR from feature branch to master branch when there is a push to the feature branch.
When a new PR is created, I have a few things I do with it, such as look up the related issue using commit messages; add the PR to a project; add some more details to the PR; etc. However, I can't do any of that if the PR workflow doesn't run following the push workflow.
Is there a specific technical reason why the limitation exists? Such as unintended infinite feedback loops of workflows? Because you can probably limit that to some depth using the token -- I doubt most of us needing this functionality would need anything more than 3 levels of chaining.
Hi Chris, do you have any news on this? I just bumped into yet another issue that made Coveralls break for me: https://github.com/coverallsapp/github-action/issues/19#issuecomment-553078356
Is this still the case? I'm actually seeing workflows being triggered from commits pushed with GITHUB_TOKEN, which I was hoping it wouldn't...
Any update on this? Trying to get https://github.com/tibdex/autosquash working when all checks have successfully completed and not having any luck. Thanks!