Skip to main content

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

Using the latest version of the official bundled actions

You can update the actions that are bundled with your enterprise, or use actions directly from GitHub.com.

注: GitHub 托管的运行器目前在 GitHub Enterprise Server 上不受支持。 您可以在 GitHub 公共路线图 上查看有关未来支持计划的更多信息。

Your enterprise instance includes a number of built-in actions that you can use in your workflows. For more information about the bundled actions, see "Official actions bundled with your enterprise instance."

These bundled actions are a point-in-time snapshot of the official actions found at https://github.com/actions, so there may be newer versions of these actions available. You can use the actions-sync tool to update these actions, or you can configure GitHub Connect to allow access to the latest actions on GitHub.com. These options are described in the following sections.

Using actions-sync to update the bundled actions

To update the bundled actions, you can use the actions-sync tool to update the snapshot. For more information on using actions-sync, see "Manually syncing actions from GitHub.com."

Using GitHub Connect to access the latest actions

You can use GitHub Connect to allow GitHub Enterprise Server to use actions from GitHub.com. For more information, see "Enabling automatic access to GitHub.com actions using GitHub Connect."

Once GitHub Connect is configured, you can use the latest version of an action by deleting its local repository in the actions organization on your instance. For example, if your enterprise instance is using v1 of the actions/checkout action, and you need to use actions/checkout@v2 which isn't available on your enterprise instance, perform the following steps to be able to use the latest checkout action from GitHub.com:

  1. From an enterprise owner account on GitHub Enterprise Server, navigate to the repository you want to delete from the actions organization (in this example checkout).
  2. By default, site administrators are not owners of the bundled actions organization. To get the access required to delete the checkout repository, you must use the site admin tools. Click in the upper-right corner of any page in that repository. Rocketship icon for accessing site admin settings
  3. Click Security to see the security overview for the repository. Security header the repository
  4. Under "Privileged access", click Unlock. Unlock button
  5. Under Reason, type a reason for unlocking the repository, then click Unlock. Confirmation dialog
  6. Now that the repository is unlocked, you can leave the site admin pages and delete the repository within the actions organization. At the top of the page, click the repository name, in this example checkout, to return to the summary page. Repository name link
  7. Under "Repository info", click View code to leave the site admin pages and display the checkout repository.
  8. Delete the checkout repository within the actions organization. For information on how to delete a repository, see "Deleting a repository." View code link
  9. Configure your workflow's YAML to use actions/checkout@v2.
  10. Each time your workflow runs, the runner will use the specified version of actions/checkout from GitHub.com.