How to run and enable GitHub actions on forked repo with github api

I want to fork a repo that contains actions and workflows, but I have noticed workflows don’t run on the forked repository and I have to enable it.

I want to know is it possible to enable and run it with GitHub API?



Hi there, we currently don’t have the ability to enable that in the API, but that’s something we could consider adding in the future. I’ll send this idea to the Engineering team.


Thanks for the reply, that would be great and very helpful.

This is a strange limitation. We use Actions on workarea-commerce/workarea, and when people make pull requests, actions aren’t being run.

Does this mean that every person who wants to contribute needs to enable actions in their fork so we can get a passing build? Honestly, this seems a little counter-intuitive. I understand the need to not leak secrets, but perhaps the workflows could only fail to run when a forked repo changes them, that way you can be sure that there’s no malicious stuff going on with people trying to steal your credentials…

I guess pull_request_target would help for that?