Skip to main content

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

Sharing workflows, secrets, and runners with your organization

Learn how you can use organization features to collaborate with your team, by sharing starter workflows, secrets, and self-hosted runners.

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

Overview

If you need to share workflows and other GitHub Actions features with your team, then consider collaborating within a GitHub organization. An organization allows you to centrally store and manage secrets, artifacts, and self-hosted runners. You can also create starter workflows in the .github repository and share them with other users in your organization.

Sharing workflows

Your organization can share workflows by reusing the workflows exactly or by creating starter workflows that provide templates for new workflows.

Using starter workflows

组织中所有有权创建工作流的人员可利用入门工作流,更快、更轻松地创建工作流。 创建新工作流时,你可以选择入门工作流,系统将为你完成编写工作流的部分或全部工作。 你可以使用入门工作流作为基础来构建自定义工作流,或按原样使用。 这不仅可以节省时间,而且促进了整个组织的一致性和最佳做法。 For more information, see "Creating starter workflows for your organization."

Sharing secrets within an organization

You can centrally manage your secrets within an organization, and then make them available to selected repositories. This also means that you can update a secret in one location, and have the change apply to all repository workflows that use the secret.

When creating a secret in an organization, you can use a policy to limit which repositories can access that secret. For example, you can grant access to all repositories, or limit access to only private repositories or a specified list of repositories.

要在组织级别创建机密,必须具有 admin 访问权限。

  1. 在 your GitHub Enterprise Server instance 上,导航到组织的主页。

  2. 在组织名称下,单击“设置”。 组织设置按钮

  3. In the left sidebar, click Secrets.

  4. Click New secret.

  5. Type a name for your secret in the Name input box.

  6. Enter the Value for your secret.

  7. From the Repository access dropdown list, choose an access policy.

  8. Click Add secret.

Share self-hosted runners within an organization

Organization admins can add their self-hosted runners to groups, and then create policies that control which repositories can access the group.

For more information, see "Managing access to self-hosted runners using groups."

Next steps

To continue learning about GitHub Actions, see "Creating starter workflows for your organization."