Add self-hosted runners on the fly


Is it possible to create a runner inside of a workflow and add it as a self-hosted runner? I saw that if you want to add a runner, you need to install the agent with a token. Which API I can reach to get this new token?

Currently, github actions doesn’t provide an API to generate token for install self-hosted runner. You could only see the token in web site.

The good news is that an API for this is on the roadmap. I don’t have a timeline to share at the moment. But we’ll be posting to the Changelog when this is available.

Please refer to this previous ticket: