Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

About using actions in your enterprise

GitHub Enterprise Server includes most GitHub-authored actions, and has options for enabling access to other actions from GitHub.com and GitHub Marketplace.

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

About actions on GitHub Enterprise Server

GitHub Actions workflows can use actions, which are individual tasks that you can combine to create jobs and customize your workflow. You can create your own actions, or use and customize actions shared by the GitHub community.

GitHub Enterprise Server 上的 GitHub Actions 设计为在� 法完全访问互联网的环境中工作。 默认情况下,工作流不能使用直接来自 GitHub.com 和 GitHub Marketplace 的操作。 You can restrict your developers to using actions that are stored on your GitHub Enterprise Server instance, which includes most official GitHub-authored actions, as well as any actions your developers create. Alternatively, to allow your developers to benefit from the full ecosystem of actions built by industry leaders and the open source community, you can configure access to other actions from GitHub.com.

We recommend allowing automatic access to all actions from GitHub.com. However, this does require GitHub Enterprise Server to make outbound connections to GitHub.com. If you don't want to allow these connections, or you want to have greater control over which actions are used on your enterprise, you can manually sync specific actions from GitHub.com.

Official actions bundled with your enterprise instance

大多数 GitHub 编写的官方操作都会自动与 GitHub Enterprise Server 捆绑,并且会在某个时间点从 GitHub Marketplace 捕获。

The bundled official actions include the following, among others.

  • actions/checkout
  • actions/upload-artifact
  • actions/download-artifact
  • actions/labeler
  • Various actions/setup- actions

To see all the official actions included on your enterprise instance, browse to the actions organization on your instance: https://HOSTNAME/actions.

There is no connection required between your GitHub Enterprise Server instance and GitHub.com to use these actions.

Each action is a repository in the actions organization, and each action repository includes the necessary tags, branches, and commit SHAs that your workflows can use to reference the action. For information on how to update the bundled official actions, see "Using the latest version of the official bundled actions."

Notes:

  • When using setup actions (such as actions/setup-LANGUAGE) on GitHub Enterprise Server with self-hosted runners, you might need to set up the tools cache on runners that do not have internet access. For more information, see "Setting up the tool cache on self-hosted runners without internet access."
  • When GitHub Enterprise Server is updated, bundled actions are automatically replaced with default versions in the upgrade package.

Configuring access to actions on GitHub.com

如果企业中的用户需要访问来自 GitHub.com 或 GitHub Marketplace 的其他操作,有� 个配置选项。

The recommended approach is to enable automatic access to all actions from GitHub.com. You can do this by using GitHub Connect to integrate GitHub Enterprise Server with GitHub Enterprise Cloud. For more information, see "Enabling automatic access to GitHub.com actions using GitHub Connect".

Note: Before you can configure access to actions on GitHub.com, you must configure your GitHub Enterprise Server instance to use GitHub Actions. For more information, see "Getting started with GitHub Actions for GitHub Enterprise Server."

To use actions from GitHub.com, both your GitHub Enterprise Server instance and your self-hosted runners must be able to make outbound connections to GitHub.com. No inbound connections from GitHub.com are required. For more information. For more information, see "About self-hosted runners."

在启用 GitHub Connect 后,您可以使用策略限制哪些公共操作可用于您企业的仓库中。 有关详细信息,请参阅“为企业强制实施 GitHub Actions 策略”。

Alternatively, if you want stricter control over which actions are allowed in your enterprise, or you do not want to allow outbound connections to GitHub.com, you can manually download and sync actions onto your enterprise instance using the actions-sync tool. For more information, see "Manually syncing actions from GitHub.com."