注意: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
访问权限。
-
On your GitHub Enterprise Server instance, navigate to the main page of the organization.
-
在组织名称下,单击“设置”。
-
In the left sidebar, click Secrets.
-
Click New secret.
-
Type a name for your secret in the Name input box.
-
Enter the Value for your secret.
-
From the Repository access dropdown list, choose an access policy.
-
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."