Skip to main content

关于使用 GitHub 托管的运行器进行专用网络联网

可以将 GitHub 托管的运行器连接到专用网络上的资源,包括包注册表、机密管理器和其他本地服务。

注意:GitHub Enterprise Server 目前不支持 GitHub 托管的运行器。 可以在 GitHub public roadmap 上查看有关未来支持计划的更多信息。

关于 GitHub 托管的运行器网络

By default, GitHub-hosted runners have access to the public internet. However, you may also want these runners to access resources on your private network, such as a package registry, a secret manager, or other on-premise services.

GitHub-hosted runners are shared across all GitHub customers. However with private networking, you can configure hosted runners to be exclusively used to connect to your private network and resources while they are running your workflows.

可以采用几种不同的方法来配置此访问,每个方法都有不同的优缺点。

将 API 网关与 OIDC 配合使用

借助 GitHub Actions,可以使用 OpenID Connect (OIDC) 令牌对 GitHub Actions 之外的工作流进行身份验证。 有关详细信息,请参阅“将 API 网关与 OIDC 配合使用”。

使用 WireGuard 创建网络覆盖

如果不想为 API 网关维护单独的基础结构,可以通过在专用网络的运行器和服务中运行 WireGuard,在这两者之间创建覆盖网络。 有关详细信息,请参阅“使用 WireGuard 创建网络覆盖”。