4 ms·
"You can’t have actions that call other actions" - I think it's possible to use the repository_dispatch trigger described at https://docs.github.com/en/actions/
by simonw 5y ago
"You can’t have actions that call other actions" - I think it's possible to use the repository_dispatch trigger described at https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch https://docs.github.com/en/actions/reference/events-that-tri... for this - you'd need a separate GitHub personal access token, but using that it should be possible to trigger a workflow in any other repository you own from an API call in another action.
- 147 5y agoI meant that in the context of composite actions. You can't package up a composite action that can call other actions, at least not yet.
- arccy 5y agoPretty new: https://github.blog/changelog/2021-08-25-github-actions-reduce-duplication-with-action-composition/ https://github.blog/changelog/2021-08-25-github-actions-redu...
- akerl_ 5y agoThe issue is that once you add a PAT, you’ve imbued the build with your permissions. You can bound which permissions by call type (so, for example, you can make a token that can’t modify your profile info), but you can’t bound it by repository. So if you need the build to trigger write actions on one repo, now it has them for all repos.
- simonw 5y agoAgreed, this is an infuriating limitation of PATs - I would desperately like to be able to create a PAT with much more finely grained permissions - can only trigger this single REST API for this specific repo for example. There's a brilliant trick for doing that described here but it's a lot of work to setup: https://blog.thea.codes/building-a-stateless-api-proxy/ https://blog.thea.codes/building-a-stateless-api-proxy/ You can also create a brand new GitHub user account, grant it access to just a single repository and then create a PAT for that user account - annoying but it does at least let you scope down the permissions a bit.