cdk-github-runners icon indicating copy to clipboard operation
cdk-github-runners copied to clipboard

feat: add option to use PAT to register runners on enterprise level

Open pharindoko opened this issue 2 years ago • 4 comments

Currently it`s only possible to register runners on repository level using the PAT option. And via github app it`s only possible to do this on repo or org level.

I would like to be able to register runners on enterprise level using GHES.

You can set in the pat permissions the option to

  • manage_runners:enterprise | Manage enterprise runners and runner groups This would give us new opportunities to use the runners at scale and simplify the management.

pharindoko avatar Nov 15 '23 10:11 pharindoko

I'm open to it, but don't have GHES to test.

kichik avatar Nov 18 '23 22:11 kichik

How do you register runners on the enterprise level with API? I can only see API for organization registration that can take a token with manage_runners:enterprise.

kichik avatar Nov 20 '23 16:11 kichik

Haven`t registered a runner yet on enterprise level. As far as I`ve read this should work ... https://docs.github.com/en/[email protected]/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-enterprise

pharindoko avatar Nov 22 '23 15:11 pharindoko

Seems like this is the API we were looking for.

kichik avatar Nov 25 '23 17:11 kichik