use Self hosted runners in github workflow action
once you migrated your repos into github. you might want to set up some workflow actions whenever there is something changed on the github repo. In the actions, you might try invoking some APIs which is not public faced but internal private ones to do some checkup such as checkmarx scan. If you use github default runners, which is ubuntu-latest
, you might encounter errors like could not resolve host
.
0curl: (6) Could not resolve host: your.internal.host.com
Use self-hosted runners
here you are the solution.
You can add a self-hosted runner to a repository, an organization, or an enterprise.
If you are an organization or enterprise administrator, you might want to add your self-hosted runners at the organization or enterprise level. This approach makes the runner available to multiple repositories in your organization or enterprise, and also lets you to manage your runners in one place.
For information on supported operating systems for self-hosted runners, or using self-hosted runners with a proxy server, see "About self-hosted runners."
Warning: We recommend that you only use self-hosted runners with private repositories. This is because forks of your public repository can potentially run dangerous code on your self-hosted runner machine by creating a pull request that executes the code in a workflow.
For more information, see "About self-hosted runners."
You can set up automation to scale the number of self-hosted runners. For more information, see "Autoscaling with self-hosted runners."
You can register ephemeral runners that perform a single job before the registration is cleaned up by using just-in-time runner registration. For more information, see "Security hardening for GitHub Actions."
Adding self-hosted runners - GitHub Docs
You can add a self-hosted runner to a repository, an organization, or an enterprise.