Sharing self hosted runners across repositories

Hi,

I would like to set up my self hosted runner to work with not only a single repository but multiple repositories. And then I came across there is a organizational level runner solution.

Currently, I’m not setting up my repos to be part of any organization. Do I need to create an organization and transfer my account to use this feature? Also, is there another way to use a self-hosted runner for multiple repositories? Do I need to create separate directories, “actions-runner”, “actions-runner2”, and then configure separately and launch services for each repository?

Please let me know what is the best practice here.

Thank you,
manoaman

To use the organization level self-hosted runner , yes, you could create an organization. And then transfer your current repos in your personal account to that organization.
Or you could turn your personal account into an organization directly, please pay attention to the warning before you turn it.
There is the document for “Converting a user into an organization” .

Also, is there another way to use a self-hosted runner for multiple repositories? Do I need to create separate directories, “actions-runner”, “actions-runner2”, and then configure separately and launch services for each repository?

There is no other ways to use self-hosted runner for multiple repositories.
If you install multiple runners into one machine, creating separate directories for different runners is a preferred way. Each runner should be configured separately, the url provided for config.sh is your org url not repo url.

./config.sh --url https://github.com/{orgname}--token ****

Then you could manage repository permissions in organization settings > actions > self-hosted runner section.


After you launch the runner service, all repos which you give permission could access to this runner.

Thank you yajingzhu. I have managed to set up runners for each repo instead of making my account to organization. Hopefully there is a way to share a runner across my repos without changing my account to organization.

1 Like