{"meta":{"title":"与企业共享操作和工作流","intro":"无需公开发布操作或工作流，即可与企业共享操作或可重用工作流。","product":"GitHub Actions","breadcrumbs":[{"href":"/zh/enterprise-cloud@latest/actions","title":"GitHub Actions"},{"href":"/zh/enterprise-cloud@latest/actions/how-tos","title":"操作方法"},{"href":"/zh/enterprise-cloud@latest/actions/how-tos/reuse-automations","title":"重用自动化"},{"href":"/zh/enterprise-cloud@latest/actions/how-tos/reuse-automations/share-with-your-enterprise","title":"与企业共享"}],"documentType":"article"},"body":"# 与企业共享操作和工作流\n\n无需公开发布操作或工作流，即可与企业共享操作或可重用工作流。\n\n## 概述\n\n如果组织归企业帐户所有，则可以在企业中共享操作和可重用工作流，而无需公开发布它们，方法是允许 GitHub Actions 工作流访问包含操作或可重用工作流的内部或专用存储库。\n\n存储在内部或专用仓库中的任何操作或可重用工作流都可以用于同一组织或企业拥有的任何组织所拥有的其他内部或专用仓库中定义的工作流。 存储在内部仓库中的操作和可重用工作流不能在公共仓库中使用，存储在专用仓库中的操作和可重用工作流不能在公共或内部仓库中使用。\n\n> \\[!WARNING]\n>\n> * 如果使专用存储库可供其他存储库中的 GitHub Actions 工作流访问，则其他存储库中的外部协作者可以间接访问专用存储库，即使他们没有直接访问这些存储库的权限。 当使用来自专用存储库的操作或工作流时，外部协作者可以查看工作流运行的日志。\n> * 为了允许运行器下载这些操作，GitHub 向运行器传递一个作用域内的安装令牌。 此令牌具有对存储库的读取访问权限，会在一小时后自动过期。\n\n## 与企业共享操作和工作流\n\n1. 将操作或可重用工作流存储在内部或专用仓库中。 有关详细信息，请参阅“[关于仓库](/zh/enterprise-cloud@latest/repositories/creating-and-managing-repositories/about-repositories)”。\n2. 配置仓库以允许访问其他内部或专用仓库中的工作流。 有关详细信息，请参阅 [管理存储库的GitHub Actions设置](/zh/enterprise-cloud@latest/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-a-private-repository) 和 [管理存储库的GitHub Actions设置](/zh/enterprise-cloud@latest/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)。\n\n## 其他阅读材料\n\n* [企业帐户](/zh/enterprise-cloud@latest/admin/concepts/enterprise-fundamentals/enterprise-accounts)\n* [重用工作流](/zh/enterprise-cloud@latest/actions/how-tos/reuse-automations/reuse-workflows)"}