1
0
mirror of synced 2026-01-08 21:02:10 -05:00

New translation batch for cn (#25860)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/lint-translation-files.js --check parsing

* Run script/i18n/lint-translation-files.js --check rendering

* run script/i18n/reset-files-with-broken-liquid-tags.js --language=cn

* run script/i18n/reset-known-broken-translation-files.js

* Check in cn CSV report

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
This commit is contained in:
docubot
2022-03-04 12:01:49 -08:00
committed by GitHub
parent 287b79cc4c
commit af9dbd3cea
367 changed files with 1328 additions and 1653 deletions

View File

@@ -108,8 +108,6 @@ translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scannin
translations/zh-CN/content/code-security/getting-started/securing-your-organization.md,broken liquid tags
translations/zh-CN/content/code-security/getting-started/securing-your-repository.md,broken liquid tags
translations/zh-CN/content/code-security/secret-scanning/about-secret-scanning.md,broken liquid tags
translations/zh-CN/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md,broken liquid tags
translations/zh-CN/content/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning.md,broken liquid tags
translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions.md,broken liquid tags
translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot.md,broken liquid tags
translations/zh-CN/content/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies.md,Listed in localization-support#489
@@ -137,7 +135,6 @@ translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/ins
translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/overview/creating-your-first-repository-using-github-desktop.md,broken liquid tags
translations/zh-CN/content/developers/apps/building-github-apps/rate-limits-for-github-apps.md,broken liquid tags
translations/zh-CN/content/developers/apps/getting-started-with-apps/about-apps.md,broken liquid tags
translations/zh-CN/content/developers/apps/getting-started-with-apps/activating-optional-features-for-apps.md,broken liquid tags
translations/zh-CN/content/developers/apps/getting-started-with-apps/migrating-oauth-apps-to-github-apps.md,broken liquid tags
translations/zh-CN/content/developers/github-marketplace/github-marketplace-overview/about-github-marketplace.md,broken liquid tags
translations/zh-CN/content/developers/github-marketplace/github-marketplace-overview/index.md,broken liquid tags
@@ -181,7 +178,6 @@ translations/zh-CN/content/organizations/managing-organization-settings/managing
translations/zh-CN/content/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization.md,Listed in localization-support#489
translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/adding-a-billing-manager-to-your-organization.md,parsing error
translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md,broken liquid tags
translations/zh-CN/content/packages/learn-github-packages/deleting-a-package.md,broken liquid tags
translations/zh-CN/content/packages/learn-github-packages/installing-a-package.md,broken liquid tags
translations/zh-CN/content/packages/learn-github-packages/introduction-to-github-packages.md,broken liquid tags
translations/zh-CN/content/packages/learn-github-packages/publishing-a-package.md,broken liquid tags
@@ -226,7 +222,9 @@ translations/zh-CN/data/reusables/actions/enterprise-common-prereqs.md,broken li
translations/zh-CN/data/reusables/actions/enterprise-marketplace-actions.md,broken liquid tags
translations/zh-CN/data/reusables/actions/enterprise-no-internet-actions.md,broken liquid tags
translations/zh-CN/data/reusables/actions/enterprise-postinstall-nextsteps.md,broken liquid tags
translations/zh-CN/data/reusables/actions/self-hosted-runner-architecture.md,broken liquid tags
translations/zh-CN/data/reusables/actions/self-hosted-runner-auto-removal.md,broken liquid tags
translations/zh-CN/data/reusables/actions/self-hosted-runners-prerequisites.md,broken liquid tags
translations/zh-CN/data/reusables/advanced-security/about-committer-numbers-ghec-ghes.md,broken liquid tags
translations/zh-CN/data/reusables/apps/deprecating_auth_with_query_parameters.md,Listed in localization-support#489
translations/zh-CN/data/reusables/code-scanning/codeql-context-for-actions-and-third-party-tools.md,broken liquid tags
@@ -253,7 +251,6 @@ translations/zh-CN/data/reusables/repositories/github-reviews-security-advisorie
translations/zh-CN/data/reusables/rest-reference/activity/events.md,broken liquid tags
translations/zh-CN/data/reusables/rest-reference/apps/marketplace.md,broken liquid tags
translations/zh-CN/data/reusables/rest-reference/packages/packages.md,broken liquid tags
translations/zh-CN/data/reusables/rest-reference/secret-scanning/secret-scanning.md,broken liquid tags
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,Listed in localization-support#489
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,parsing error
translations/zh-CN/data/reusables/scim/after-you-configure-saml.md,broken liquid tags
1 file reason
108 translations/zh-CN/content/code-security/getting-started/securing-your-organization.md broken liquid tags
109 translations/zh-CN/content/code-security/getting-started/securing-your-repository.md broken liquid tags
110 translations/zh-CN/content/code-security/secret-scanning/about-secret-scanning.md broken liquid tags
translations/zh-CN/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md broken liquid tags
translations/zh-CN/content/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning.md broken liquid tags
111 translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions.md broken liquid tags
112 translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot.md broken liquid tags
113 translations/zh-CN/content/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies.md Listed in localization-support#489
135 translations/zh-CN/content/desktop/installing-and-configuring-github-desktop/overview/creating-your-first-repository-using-github-desktop.md broken liquid tags
136 translations/zh-CN/content/developers/apps/building-github-apps/rate-limits-for-github-apps.md broken liquid tags
137 translations/zh-CN/content/developers/apps/getting-started-with-apps/about-apps.md broken liquid tags
translations/zh-CN/content/developers/apps/getting-started-with-apps/activating-optional-features-for-apps.md broken liquid tags
138 translations/zh-CN/content/developers/apps/getting-started-with-apps/migrating-oauth-apps-to-github-apps.md broken liquid tags
139 translations/zh-CN/content/developers/github-marketplace/github-marketplace-overview/about-github-marketplace.md broken liquid tags
140 translations/zh-CN/content/developers/github-marketplace/github-marketplace-overview/index.md broken liquid tags
178 translations/zh-CN/content/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization.md Listed in localization-support#489
179 translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/adding-a-billing-manager-to-your-organization.md parsing error
180 translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md broken liquid tags
translations/zh-CN/content/packages/learn-github-packages/deleting-a-package.md broken liquid tags
181 translations/zh-CN/content/packages/learn-github-packages/installing-a-package.md broken liquid tags
182 translations/zh-CN/content/packages/learn-github-packages/introduction-to-github-packages.md broken liquid tags
183 translations/zh-CN/content/packages/learn-github-packages/publishing-a-package.md broken liquid tags
222 translations/zh-CN/data/reusables/actions/enterprise-marketplace-actions.md broken liquid tags
223 translations/zh-CN/data/reusables/actions/enterprise-no-internet-actions.md broken liquid tags
224 translations/zh-CN/data/reusables/actions/enterprise-postinstall-nextsteps.md broken liquid tags
225 translations/zh-CN/data/reusables/actions/self-hosted-runner-architecture.md broken liquid tags
226 translations/zh-CN/data/reusables/actions/self-hosted-runner-auto-removal.md broken liquid tags
227 translations/zh-CN/data/reusables/actions/self-hosted-runners-prerequisites.md broken liquid tags
228 translations/zh-CN/data/reusables/advanced-security/about-committer-numbers-ghec-ghes.md broken liquid tags
229 translations/zh-CN/data/reusables/apps/deprecating_auth_with_query_parameters.md Listed in localization-support#489
230 translations/zh-CN/data/reusables/code-scanning/codeql-context-for-actions-and-third-party-tools.md broken liquid tags
251 translations/zh-CN/data/reusables/rest-reference/activity/events.md broken liquid tags
252 translations/zh-CN/data/reusables/rest-reference/apps/marketplace.md broken liquid tags
253 translations/zh-CN/data/reusables/rest-reference/packages/packages.md broken liquid tags
translations/zh-CN/data/reusables/rest-reference/secret-scanning/secret-scanning.md broken liquid tags
254 translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md Listed in localization-support#489
255 translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md parsing error
256 translations/zh-CN/data/reusables/scim/after-you-configure-saml.md broken liquid tags

View File

@@ -65,15 +65,11 @@ shortTitle: 管理您的订阅
![管理通知下拉菜单选项](/assets/images/help/notifications-v2/manage-notifications-options.png)
2. 在关注的仓库页面上,评估您关注的仓库后,选择是否:
{%- ifversion fpt or ghes > 3.0 or ghae or ghec %}
- 取消关注仓库
- 忽略某仓库的所有通知
- 如有启用,请自定义接收通知的事件类型({% data reusables.notifications-v2.custom-notification-types %}
{%- else %}
- 取消关注仓库
- 只关注某仓库的发行版
- 忽略某仓库的所有通知
{%- endif %}
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5819 %}
1. (可选)要取消订阅指定用户或组织拥有的所有存储库,请选择 **Unwatch all全部取消关注**下拉列表,然后单击要取消订阅其存储库的组织。 取消关注所有存储库的按钮仅在您正在关注超过 10 个存储库上的所有活动或自定义通知时才可用。

View File

@@ -39,13 +39,11 @@ shortTitle: 查看订阅
更多信息请参阅“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#automatic-watching)”。
To see an overview of your repository subscriptions, see "[Reviewing repositories that you're watching](#reviewing-repositories-that-youre-watching)." Many people forget about repositories that they've chosen to watch in the past. From the "Watched repositories" page you can quickly unwatch repositories. For more information on ways to unsubscribe, see "[Managing subscriptions](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)."
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
{% tip %}
**提示:**您可以在[关注页面](https://github.com/watching)或 {% data variables.product.product_name %} 上的任何仓库页面,使用 **Watch/Unwatch关注/取消关注)**下拉列表中的 **Custom自定义**选项选择要通知的事件类型。 更多信息请参阅“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository)”。
{% endtip %}
{% endif %}
许多人忘记了他们过去选择关注的仓库。 从“Watched repositories已关注仓库”页面您可以快速取消关注仓库。 有关取消订阅的方式的更多信息,请参阅 {% data variables.product.prodname_blog %} 上的“[取消关注建议](https://github.blog/changelog/2020-11-10-unwatch-recommendations/)”和“[管理订阅](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)”。 您也可以创建分类工作流程来帮助整理收到的通知。 有关分类工作流程的指导,请参阅“[自定义对通知分类的工作流程](/github/managing-subscriptions-and-notifications-on-github/customizing-a-workflow-for-triaging-your-notifications)”。
@@ -70,16 +68,11 @@ To see an overview of your repository subscriptions, see "[Reviewing repositorie
## 查看您目前关注的仓库
1. 在左侧边栏中的仓库列表下使用“Manage notifications管理通知”下拉菜单单击 **Watched repositories已关注的仓库**。 ![管理通知下拉菜单选项](/assets/images/help/notifications-v2/manage-notifications-options.png)
2. 评估您正在关注的仓库,确定它们更新是否仍然相关和有用。 关注某仓库后,您将收到该仓库所有对话的通知。
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![已关注的通知页面](/assets/images/help/notifications-v2/watched-notifications-custom.png)
{% else %}
![已关注的通知页面](/assets/images/help/notifications-v2/watched-notifications.png)
{% endif %}
2. 评估您正在关注的仓库,确定它们更新是否仍然相关和有用。 关注某仓库后,您将收到该仓库所有对话的通知。 ![已关注的通知页面](/assets/images/help/notifications-v2/watched-notifications-custom.png)
{% tip %}
**提示:**不关注仓库,而是考虑仅{% ifversion fpt or ghes > 3.0 or ghae or ghec %}当 {% data reusables.notifications-v2.custom-notification-types %}(如果已对仓库启用)或这些选项的任何组合有更新、{% else %}仓库中有发布{% endif %}或完全取消关注仓库时才接收通知。
**Tip:** Instead of watching a repository, consider only receiving notifications when there are updates to {% data reusables.notifications-v2.custom-notification-types %} (if enabled for the repository), or any combination of these options, or completely unwatching a repository.
取消关注仓库后,当您被@提及或参与帖子时仍然会收到通知。 当您配置接收某些事件类型的通知时,仅在仓库中有这些事件类型的更新、您参与了线程或者您或您所在团队被 @提及时才收到通知

View File

@@ -29,9 +29,8 @@ topics:
您可以选择订阅关于以下内容的通知:
- 关于特定议题、拉取请求或 Gist 的对话。
- 仓库或团队讨论中的所有活动。
- CI 活动,例如仓库中使用 {% data variables.product.prodname_actions %} 设置的工作流程的状态。 {% ifversion fpt or ghes > 3.0 or ghae or ghec %}
- 仓库 {% data reusables.notifications-v2.custom-notification-types %} (如果启用)。{% else %}
- 在仓库中发布。{% endif %}
- CI 活动,例如仓库中使用 {% data variables.product.prodname_actions %} 设置的工作流程的状态。
- 仓库 {% data reusables.notifications-v2.custom-notification-types %} (如果启用)。
您也可以选择自动关注所有您有推送访问权限的仓库,但复刻除外。 您可以通过单击 **Watch关注**来手动关注您有权访问的任何其他仓库。

View File

@@ -71,16 +71,13 @@ When you watch a repository, you're subscribing to updates for activity in that
To see repositories that you're watching, go to your [watching page](https://github.com/watching). For more information, see "[Managing subscriptions and notifications on GitHub](/github/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github)."
{% ifversion ghae or ghes < 3.1 %}
{% ifversion ghae %}
### Configuring notifications
{% endif %}
You can configure notifications for a repository on the repository page, or on your watching page.{% ifversion ghes < 3.1 %} You can choose to only receive notifications for releases in a repository, or ignore all notifications for a repository.{% endif %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
You can configure notifications for a repository on the repository page, or on your watching page.
### About custom notifications
You can customize notifications for a repository. For example, you can choose to only be notified when updates to one or more types of events ({% data reusables.notifications-v2.custom-notification-types %}) happen within a repository, or ignore all notifications for a repository.
{% endif %} For more information, see "[Configuring your watch settings for an individual repository](#configuring-your-watch-settings-for-an-individual-repository)" below.
You can customize notifications for a repository. For example, you can choose to only be notified when updates to one or more types of events ({% data reusables.notifications-v2.custom-notification-types %}) happen within a repository, or ignore all notifications for a repository. For more information, see "[Configuring your watch settings for an individual repository](#configuring-your-watch-settings-for-an-individual-repository)" below.
### Participating in conversations
Anytime you comment in a conversation or when someone @mentions your username, you are _participating_ in a conversation. By default, you are automatically subscribed to a conversation when you participate in it. You can unsubscribe from a conversation you've participated in manually by clicking **Unsubscribe** on the issue or pull request or through the **Unsubscribe** option in the notifications inbox.
@@ -160,17 +157,17 @@ If "Automatically watch repositories" is disabled, then you will not automatical
## Configuring your watch settings for an individual repository
You can choose whether to watch or unwatch an individual repository. You can also choose to only be notified of {% ifversion fpt or ghes > 3.0 or ghae or ghec %}certain event types such as {% data reusables.notifications-v2.custom-notification-types %} (if enabled for the repository) {% else %}new releases{% endif %}, or completely ignore an individual repository.
You can choose whether to watch or unwatch an individual repository. You can also choose to only be notified of certain event types such as {% data reusables.notifications-v2.custom-notification-types %} (if enabled for the repository) , or completely ignore an individual repository.
{% data reusables.repositories.navigate-to-repo %}
2. In the upper-right corner, select the "Watch" drop-down menu to click a watch option.
{% ifversion fpt or ghes > 3.0 or ghae-issue-4910 or ghec %}
{% ifversion fpt or ghes or ghae-issue-4910 or ghec %}
![Watch options in a drop-down menu for a repository](/assets/images/help/notifications-v2/watch-repository-options-custom.png)
The **Custom** option allows you to further customize notifications so that you're only notified when specific events happen in the repository, in addition to participating and @mentions.
{% else %}
![Watch options in a drop-down menu for a repository](/assets/images/help/notifications-v2/watch-repository-options.png){% endif %}
{% ifversion fpt or ghes > 3.0 or ghae-issue-4910 or ghec %}
{% ifversion fpt or ghes or ghae-issue-4910 or ghec %}
![Custom watch options in a drop-down menu for a repository](/assets/images/help/notifications-v2/watch-repository-options-custom2-dotcom.png)
If you select "Issues", you will be notified about, and subscribed to, updates on every issue (including those that existed prior to you selecting this option) in the repository. If you're @mentioned in a pull request in this repository, you'll receive notifications for that too, and you'll be subscribed to updates on that specific pull request, in addition to being notified about issues.
{% endif %}

View File

@@ -25,7 +25,7 @@ shortTitle: 用户到组织
- **无法**将组织转换回用户。
- SSH 密钥、OAuth 令牌、作业档案、 反应、及关联的用户信息**不会**传输到组织。 这只适用于被转换的用户帐户,而不适用于该用户帐户的任何协作者。
- 使用被转换用户帐户进行的任何提交**将不再链接**到该帐户。 提交本身**将**保持原状。
- Any forks of private repositories made with the converted user account will be deleted.
- 使用转换后用户帐户创建的任何私有仓库的复刻都将被删除。
{% endwarning %}
@@ -57,7 +57,7 @@ shortTitle: 用户到组织
{% tip %}
**提示**:将用户帐户转换为组织时,我们会将属于该帐户的仓库中的协作者作为*外部协作者*添加到新组织。 然后,您可以根据需要邀请*外部协作者*成为新组织的成员。 For more information, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)."
**提示**:将用户帐户转换为组织时,我们会将属于该帐户的仓库中的协作者作为*外部协作者*添加到新组织。 然后,您可以根据需要邀请*外部协作者*成为新组织的成员。 更多信息请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)”。
{% endtip %}

View File

@@ -31,7 +31,7 @@ shortTitle: 管理安全和分析
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.security-analysis %}
3. 在“Configure security and analysis features配置安全性和分析功能”下单击功能右侧的 **Disable all(全部禁用)**或 **Enable all(全部启用)**
3. Under "Code security and analysis", to the right of the feature, click **Disable all** or **Enable all**.
{% ifversion ghes > 3.2 %}!["Enable all" or "Disable all" button for "Configure security and analysis" features](/assets/images/enterprise/3.3/settings/security-and-analysis-disable-or-enable-all.png){% else %}!["Enable all" or "Disable all" button for "Configure security and analysis" features](/assets/images/help/settings/security-and-analysis-disable-or-enable-all.png){% endif %}
6. (可选)默认情况下为您拥有的新存储库启用该功能。
{% ifversion ghes > 3.2 %}!["Enable by default" option for new repositories](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-by-default-in-modal.png){% else %}!["Enable by default" option for new repositories](/assets/images/help/settings/security-and-analysis-enable-by-default-in-modal.png){% endif %}
@@ -44,7 +44,7 @@ shortTitle: 管理安全和分析
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.security-analysis %}
3. 在“Configure security and analysis features配置安全和分析功能”下在功能右侧默认为您拥有的新存储库启用或禁用该功能。
3. Under "Code security and analysis", to the right of the feature, enable or disable the feature by default for new repositories that you own.
{% ifversion ghes > 3.2 %}![Checkbox for enabling or disabling a feature for new repositories](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-or-disable-feature-checkbox.png){% else %}![Checkbox for enabling or disabling a feature for new repositories](/assets/images/help/settings/security-and-analysis-enable-or-disable-feature-checkbox.png){% endif %}
## 延伸阅读

View File

@@ -36,16 +36,15 @@ shortTitle: 权限用户仓库
| {% ifversion fpt or ghec %}邀请协作者{% else %}添加协作者{% endif %} | |
| "[邀请个人仓库的协作者](/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository)" | |
| 更改仓库的可见性 | “[设置仓库可见性](/github/administering-a-repository/setting-repository-visibility)” |{% ifversion fpt or ghec %}
| 限制与仓库的交互 | [限制仓库中的交互](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)”|{% endif %}{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
| 重命名分支,包括默认分支 | "[重命名分支](/github/administering-a-repository/renaming-a-branch)"
| 限制与仓库的交互 | "[限制仓库中的交互](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)"
{% endif %}
| 重命名分支,包括默认分支 | "[重命名分支](/github/administering-a-repository/renaming-a-branch)" |
| 合并受保护分支上的拉取请求(即使没有批准审查) | "[关于受保护分支](/github/administering-a-repository/about-protected-branches)" |
| 删除仓库 | "[删除仓库](/repositories/creating-and-managing-repositories/deleting-a-repository)" |
| 管理仓库的主题 | "[使用主题对仓库分类](/github/administering-a-repository/classifying-your-repository-with-topics)" |{% ifversion fpt or ghec %}
| 管理仓库的安全性和分析设置 | "[管理仓库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)" |{% endif %}{% ifversion fpt or ghec %}
| 为私有仓库启用依赖项图 | “[探索仓库的依赖项](/github/visualizing-repository-data-with-graphs/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)” |{% endif %}{% ifversion fpt or ghes > 3.1 or ghec or ghae %}
| 删除和恢复包 | “[删除和恢复包](/packages/learn-github-packages/deleting-and-restoring-a-package)”|{% endif %}{% ifversion ghes < 3.1 %}
| 删除包 | “[删除包](/packages/learn-github-packages/deleting-a-package)”
| 删除和恢复包 | “[删除和恢复软件](/packages/learn-github-packages/deleting-and-restoring-a-package)”
{% endif %}
| 自定义仓库的社交媒体预览 | "[自定义仓库的社交媒体预览](/github/administering-a-repository/customizing-your-repositorys-social-media-preview)" |
| 从仓库创建模板 | "[创建模板仓库](/github/creating-cloning-and-archiving-repositories/creating-a-template-repository)" |{% ifversion fpt or ghes or ghae-issue-4864 or ghec %}
@@ -55,9 +54,10 @@ shortTitle: 权限用户仓库
{% endif %}
| 定义仓库的代码所有者 | "[关于代码所有者](/github/creating-cloning-and-archiving-repositories/about-code-owners)" |
| 存档仓库 | "[归档存储库](/repositories/archiving-a-github-repository/archiving-repositories)"|{% ifversion fpt or ghec %}
| 创建安全通告 | "[关于 {% data variables.product.prodname_security_advisories %}](/github/managing-security-vulnerabilities/about-github-security-advisories)" |
| 显示赞助按钮 | “[在仓库中显示赞助者按钮](/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository)”|{% endif %}{% ifversion fpt or ghae or ghes > 3.0 or ghec %}
| 允许或禁止自动合并拉取请求 | "[管理仓库中的拉取请求自动合并](/github/administering-a-repository/managing-auto-merge-for-pull-requests-in-your-repository)" | {% endif %}
| 创建安全通告 | "[About {% data variables.product.prodname_security_advisories %}](/github/managing-security-vulnerabilities/about-github-security-advisories)" |
| 显示赞助按钮 | “[在仓库中显示赞助者按钮](/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository)”
{% endif %}
| 允许或禁止自动合并拉取请求 | "[管理仓库中的拉取请求自动合并](/github/administering-a-repository/managing-auto-merge-for-pull-requests-in-your-repository)" |
## 协作者对用户帐户拥有仓库的权限
@@ -71,27 +71,27 @@ shortTitle: 权限用户仓库
协作者还可以执行以下操作。
| 操作 | 更多信息 |
|:--------------------------- |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 操作 | 更多信息 |
|:--------------------------- |:------------------------------------------------------------------------------------------------------------------------------------------------- |
| 复刻仓库 | "[关于复刻](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks)" |{% ifversion fpt or ghes > 3.1 or ghae or ghec %}
| 重命名除默认分支以外的分支 | "[重命名分支](/github/administering-a-repository/renaming-a-branch)"
{% endif %}
| 在仓库中创建、编辑和删除关于提交、拉取请求和议题的评论 | <ul><li>"[关于议题](/github/managing-your-work-on-github/about-issues)"</li><li>"[评论拉取请求](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request)"</li><li>"[管理破坏性评论](/communities/moderating-comments-and-conversations/managing-disruptive-comments)"</li></ul> |
| 在仓库中创建、分配、关闭和重新打开议题 | "[使用议题管理工作](/github/managing-your-work-on-github/managing-your-work-with-issues)" |
| 在仓库中管理议题和拉取请求的标签 | "[标记议题和拉取请求](/github/managing-your-work-on-github/labeling-issues-and-pull-requests)" |
| 在仓库中管理议题和拉取请求的里程碑 | "[创建和编辑议题及拉取请求的里程碑](/github/managing-your-work-on-github/creating-and-editing-milestones-for-issues-and-pull-requests)" |
| 将仓库中的议题或拉取请求标记为重复项 | "[关于重复的议题和拉取请求](/github/managing-your-work-on-github/about-duplicate-issues-and-pull-requests)" |
| 在仓库中创建、合并和关闭拉取请求 | "[通过拉取请求提议工作更改](/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests)" |{% ifversion fpt or ghae or ghes > 3.0 or ghec %}
| 启用或禁用自动合并拉取请求 | "[自动合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)"{% endif %}
| 将建议的更改应用于仓库中的拉取请求 | "[在拉取请求中加入反馈](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request)" |
| 从仓库的复刻创建拉取请求 | "[从复刻创建拉取请求](/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)" |
| 提交影响拉取请求可合并性的拉取请求审查 | "[审查拉取请求中提议的更改](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)" |
| 为仓库创建和编辑 wiki | "[关于 wikis](/communities/documenting-your-project-with-wikis/about-wikis)" |
| 为仓库创建和编辑发行版 | “[管理仓库中的发行版](/github/administering-a-repository/managing-releases-in-a-repository)” |
| 在仓库中创建、编辑和删除关于提交、拉取请求和议题的评论 | <ul><li>"[关于议题](/github/managing-your-work-on-github/about-issues)"</li><li>"[评论拉取请求](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request)"</li><li>"[管理破坏性评论](/communities/moderating-comments-and-conversations/managing-disruptive-comments)"</li></ul> |
| 在仓库中创建、分配、关闭和重新打开议题 | "[使用议题管理工作](/github/managing-your-work-on-github/managing-your-work-with-issues)" |
| 在仓库中管理议题和拉取请求的标签 | "[标记议题和拉取请求](/github/managing-your-work-on-github/labeling-issues-and-pull-requests)" |
| 在仓库中管理议题和拉取请求的里程碑 | "[创建和编辑议题及拉取请求的里程碑](/github/managing-your-work-on-github/creating-and-editing-milestones-for-issues-and-pull-requests)" |
| 将仓库中的议题或拉取请求标记为重复项 | "[关于重复的议题和拉取请求](/github/managing-your-work-on-github/about-duplicate-issues-and-pull-requests)" |
| 在仓库中创建、合并和关闭拉取请求 | "[通过拉取请求提议工作更改](/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests)" |
| 启用或禁用自动合并拉取请求 | "[自动合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)" |
| 将建议的更改应用于仓库中的拉取请求 | "[在拉取请求中加入反馈](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request)" |
| 从仓库的复刻创建拉取请求 | "[从复刻创建拉取请求](/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)" |
| 提交影响拉取请求可合并性的拉取请求审查 | "[审查拉取请求中提议的更改](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)" |
| 为仓库创建和编辑 wiki | "[关于 wikis](/communities/documenting-your-project-with-wikis/about-wikis)" |
| 为仓库创建和编辑发行版 | “[管理仓库中的发行版](/github/administering-a-repository/managing-releases-in-a-repository)” |
| 作为仓库的代码所有者 | "[关于代码所有者](/articles/about-code-owners)" |{% ifversion fpt or ghae or ghec %}
| 发布、查看或安装包 | "[发布和管理包](/github/managing-packages-with-github-packages/publishing-and-managing-packages)"
{% endif %}
| 作为仓库协作者删除自己 | "[从协作者的仓库删除您自己](/github/setting-up-and-managing-your-github-user-account/removing-yourself-from-a-collaborators-repository)" |
| 作为仓库协作者删除自己 | "[从协作者的仓库删除您自己](/github/setting-up-and-managing-your-github-user-account/removing-yourself-from-a-collaborators-repository)" |
## 延伸阅读

View File

@@ -119,7 +119,7 @@ steps:
distribution: 'adopt'
- run: ant -noinput -buildfile build.xml
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: Package
path: build/jar

View File

@@ -138,7 +138,7 @@ steps:
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with:
arguments: build
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: Package
path: build/libs

View File

@@ -140,7 +140,7 @@ steps:
distribution: 'adopt'
- run: mvn --batch-mode --update-snapshots verify
- run: mkdir staging && cp target/*.jar staging
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: Package
path: staging

View File

@@ -218,7 +218,7 @@ jobs:
- name: Test with dotnet
run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
- name: Upload dotnet test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dotnet-results-${{ matrix.dotnet-version }}
path: TestResults-${{ matrix.dotnet-version }}

View File

@@ -73,11 +73,9 @@ jobs:
* `run: Test-Path resultsfile.log` - 检查仓库的根目录中是否存在名为 `resultsfile.log` 的文件。
* `Should -Be $true` - 使用 Pester 定义预期结果。 如果结果是非预期的,则 {% data variables.product.prodname_actions %} 会将此标记为失败的测试。 例如:
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![失败的 Pester 测试](/assets/images/help/repository/actions-failed-pester-test-updated.png)
{% else %}
![失败的 Pester 测试](/assets/images/help/repository/actions-failed-pester-test.png)
{% endif %}
* `Invoke-Pester Unit.Tests.ps1 -Passthru` - 使用 Pester 执行文件 `Unit.Tests.ps1` 中定义的测试。 例如,要执行上述相同的测试, `Unit.Tests.ps1` 将包含以下内容:
```
@@ -215,7 +213,7 @@ jobs:
shell: pwsh
run: Invoke-Pester Unit.Tests.ps1 -Passthru | Export-CliXml -Path Unit.Tests.xml
- name: Upload test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ubuntu-Unit-Tests
path: Unit.Tests.xml

View File

@@ -444,7 +444,7 @@ jobs:
- name: Test with pytest
run: pytest tests.py --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml

View File

@@ -73,7 +73,6 @@ _复合_操作允许您在一个操作中组合多个工作流程步骤。 例
{% ifversion fpt or ghec %}If you're building an action that you don't plan to make available to others, you {% else %} You{% endif %} can store the action's files in any location in your repository. 如果计划将操作、工作流程和应用程序代码合并到一个仓库中,建议将操作存储在 `.github` 目录中。 例如,`.github/actions/action-a``.github/actions/action-b`
## 与 {% data variables.product.prodname_ghe_server %} 的兼容性
To ensure that your action is compatible with {% data variables.product.prodname_ghe_server %}, you should make sure that you do not use any hard-coded references to {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API URLs. You should instead use environment variables to refer to the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API:
@@ -130,7 +129,7 @@ steps:
### 使用提交的 SHA 进行发行版管理
每个 Git 提交都会收到一个计算出来的 SHA 值,该值是唯一且不可更改的。 您操作的用户可能更喜欢依赖提交的 SHA 值,因为此方法会比指定可删除或移动的标记更可靠。 但是,这意味着用户将不会收到对该操作所做的进一步更新。 {% ifversion fpt or ghes > 3.0 or ghae or ghec %}您必须使用提交的完整 SHA 值,而不是缩写值。{% else %}使用提交的完整 SHA 值而不使用缩写值有助于防止他人使用相同缩写值进行恶意提交。{% endif %}
每个 Git 提交都会收到一个计算出来的 SHA 值,该值是唯一且不可更改的。 您操作的用户可能更喜欢依赖提交的 SHA 值,因为此方法会比指定可删除或移动的标记更可靠。 但是,这意味着用户将不会收到对该操作所做的进一步更新。 You must use a commit's full SHA value, and not an abbreviated value.
```yaml
steps:

View File

@@ -1,6 +1,6 @@
---
title: Creating a composite action
intro: 'In this guide, you''ll learn how to build a composite action.'
title: 创建组合操作
intro: 在本指南中,您将学习如何构建组合操作。
redirect_from:
- /actions/creating-actions/creating-a-composite-run-steps-action
versions:
@@ -11,7 +11,7 @@ versions:
type: tutorial
topics:
- Action development
shortTitle: Composite action
shortTitle: 组合操作
---
{% data reusables.actions.enterprise-beta %}
@@ -19,17 +19,17 @@ shortTitle: Composite action
## 简介
In this guide, you'll learn about the basic components needed to create and use a packaged composite action. 本指南的重点是打包操作所需的组件,因此很少讲操作代码的功能。 该操作将依次打印 "Hello World" 和 "Goodbye",如果您提供自定义名称,则将依次打印 "Hello [who-to-greet]" 和 "Goodbye"。 该操作还将随机数映射到 `random-number` 输出变量,并运行名为 `goodbye.sh` 的脚本。
在本指南中,您将了解创建和使用打包的组合操作所需的基本组件。 本指南的重点是打包操作所需的组件,因此很少讲操作代码的功能。 该操作将依次打印 "Hello World" 和 "Goodbye",如果您提供自定义名称,则将依次打印 "Hello [who-to-greet]" 和 "Goodbye"。 该操作还将随机数映射到 `random-number` 输出变量,并运行名为 `goodbye.sh` 的脚本。
Once you complete this project, you should understand how to build your own composite action and test it in a workflow.
完成此项目后,您应了解如何构建自己的组合操作和在工作流程测试该操作。
{% data reusables.actions.context-injection-warning %}
## 基本要求
Before you begin, you'll create a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}.
在开始之前,您将在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} 上创建一个存储库。
1. 在 {% data variables.product.product_location %} 上创建公共仓库 You can choose any repository name, or use the following `hello-world-composite-action` example. 您可以在项目推送到 {% data variables.product.product_name %} 之后添加这些文件。 更多信息请参阅“[创建新仓库](/articles/creating-a-new-repository)”。
1. 在 {% data variables.product.product_location %} 上创建公共仓库 您可以选择任何仓库名称,或者使用下面的 `hello-world-composite-action` 示例。 您可以在项目推送到 {% data variables.product.product_name %} 之后添加这些文件。 更多信息请参阅“[创建新仓库](/articles/creating-a-new-repository)”。
1. 将仓库克隆到计算机。 更多信息请参阅“[克隆仓库](/articles/cloning-a-repository)”。
@@ -39,7 +39,7 @@ Before you begin, you'll create a repository on {% ifversion ghae %}{% data vari
cd hello-world-composite-action
```
2. In the `hello-world-composite-action` repository, create a new file called `goodbye.sh`, and add the following example code:
2. `hello-world-composite-action` 仓库中,创建一个名为 `goodbye.sh` 的新文件,并添加以下示例代码:
```bash
echo "Goodbye"
@@ -60,7 +60,7 @@ Before you begin, you'll create a repository on {% ifversion ghae %}{% data vari
## 创建操作元数据文件
1. In the `hello-world-composite-action` repository, create a new file called `action.yml` and add the following example code. For more information about this syntax, see "[`runs` for a composite actions](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-actions)".
1. `hello-world-composite-action` 仓库中,创建一个名为 `action.yml` 的新文件,并添加以下示例代码: 有关此语法的更多信息,请参阅“组合运行步骤的[`运行`](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-actions)”。
{% raw %}
**action.yml**
@@ -90,9 +90,9 @@ Before you begin, you'll create a repository on {% ifversion ghae %}{% data vari
shell: bash
```
{% endraw %}
此文件定义 `who-greet` 输入,将随机生成的数字映射到 `random-number` 输出变量,并运行 `goodbye.sh` 脚本。 It also tells the runner how to execute the composite action.
此文件定义 `who-greet` 输入,将随机生成的数字映射到 `random-number` 输出变量,并运行 `goodbye.sh` 脚本。 它还告诉运行器如何执行组合操作。
For more information about managing outputs, see "[`outputs` for a composite action](/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions)".
有关管理输出的更多信息,请参阅“组合运行步骤的[`输出`](/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions)”。
有关如何使用 `github.action_path` 的更多信息,请参阅“[`github context`](/actions/reference/context-and-expression-syntax-for-github-actions#github-context)”。
@@ -115,7 +115,7 @@ Before you begin, you'll create a repository on {% ifversion ghae %}{% data vari
以下工作流程代码使用您在“[创建操作元数据文件](/actions/creating-actions/creating-a-composite-action#creating-an-action-metadata-file)”中设置的已完成 hello world 操作。
Copy the workflow code into a `.github/workflows/main.yml` file in another repository, but replace `actions/hello-world-composite-action@v1` with the repository and tag you created. 您还可以将 `who-to-greet` 输入替换为您的名称。
将工作流程代码复制到另一个仓库中的 `.github/workflows/main.yml` 文件,但用您创建的仓库和标记替换 `actions/hello-world-composite-action@v1` 您还可以将 `who-to-greet` 输入替换为您的名称。
{% raw %}
**.github/workflows/main.yml**

View File

@@ -237,10 +237,7 @@ jobs:
```
{% endraw %}
从您的仓库中,单击 **Actions操作**选项卡,然后选择最新的工作流程来运行。 {% ifversion fpt or ghes > 3.0 or ghae or ghec %}在 **Jobs作业**下或可视化图表中,单击 **A job to say hello表示问候的作业**。 {% endif %}您应看到 "Hello Mona the Octocat" 或您用于 `who-to-greet` 输入的姓名和时间戳在日志中打印。
从您的仓库中,单击 **Actions操作**选项卡,然后选择最新的工作流程来运行。 Under **Jobs** or in the visualization graph, click **A job to say hello**. 您应看到 "Hello Mona the Octocat" 或您用于 `who-to-greet` 输入的姓名和时间戳在日志中打印。
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![在工作流中使用操作的屏幕截图](/assets/images/help/repository/docker-action-workflow-run-updated.png)
{% else %}
![在工作流中使用操作的屏幕截图](/assets/images/help/repository/docker-action-workflow-run.png)
{% endif %}

View File

@@ -263,12 +263,6 @@ jobs:
```
{% endraw %}
从您的仓库中,单击 **Actions操作**选项卡,然后选择最新的工作流程来运行。 {% ifversion fpt or ghes > 3.0 or ghae or ghec %}在 **Jobs作业**下或可视化图表中,单击 **A job to say hello表示问候的作业**。 {% endif %}您应看到 "Hello Mona the Octocat" 或您用于 `who-to-greet` 输入的姓名和时间戳在日志中打印。
从您的仓库中,单击 **Actions操作**选项卡,然后选择最新的工作流程来运行。 Under **Jobs** or in the visualization graph, click **A job to say hello**. 您应看到 "Hello Mona the Octocat" 或您用于 `who-to-greet` 输入的姓名和时间戳在日志中打印。
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![在工作流中使用操作的屏幕截图](/assets/images/help/repository/javascript-action-workflow-run-updated-2.png)
{% elsif ghes %}
![在工作流中使用操作的屏幕截图](/assets/images/help/repository/javascript-action-workflow-run-updated.png)
{% else %}
![在工作流中使用操作的屏幕截图](/assets/images/help/repository/javascript-action-workflow-run.png)
{% endif %}

View File

@@ -10,12 +10,6 @@ topics:
shortTitle: Share with your enterprise
---
{% note %}
**Note:** Allowing workflows to access actions in internal repositories is currently in beta and subject to change.
{% endnote %}
## About {% data variables.product.prodname_actions %} access to internal repositories
If your organization is owned by an enterprise account, you can share actions and workflows within your enterprise, without publishing the action or workflow publicly, by allowing {% data variables.product.prodname_actions %} workflows to access an internal repository that contains the action or workflow.

View File

@@ -29,8 +29,7 @@ You can set up a {% data variables.product.prodname_actions %} workflow to deplo
You can configure your CD workflow to run when a {% data variables.product.product_name %} event occurs (for example, when new code is pushed to the default branch of your repository), on a set schedule, manually, or when an external event occurs using the repository dispatch webhook. For more information about when your workflow can run, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)."
{% ifversion fpt or ghae or ghes > 3.0 or ghec %}
{% data variables.product.prodname_actions %} provides features that give you more control over deployments. For example, you can use environments to require approval for a job to proceed, restrict which branches can trigger a workflow, or limit access to secrets. {% ifversion fpt or ghae or ghes > 3.1 or ghec %}You can use concurrency to limit your CD pipeline to a maximum of one in-progress deployment and one pending deployment. {% endif %}For more information about these features, see "[Deploying with GitHub Actions](/actions/deployment/deploying-with-github-actions)" and "[Using environments for deployment](/actions/deployment/using-environments-for-deployment)."{% endif %}
{% data variables.product.prodname_actions %} provides features that give you more control over deployments. For example, you can use environments to require approval for a job to proceed, restrict which branches can trigger a workflow, or limit access to secrets. {% ifversion fpt or ghae or ghes > 3.1 or ghec %}You can use concurrency to limit your CD pipeline to a maximum of one in-progress deployment and one pending deployment. {% endif %}For more information about these features, see "[Deploying with GitHub Actions](/actions/deployment/deploying-with-github-actions)" and "[Using environments for deployment](/actions/deployment/using-environments-for-deployment)."
{% ifversion fpt or ghec or ghae-issue-4856 %}
@@ -44,12 +43,9 @@ You can configure your CD workflow to run when a {% data variables.product.produ
{% data reusables.actions.cd-templates-actions %}
{% ifversion fpt or ghae or ghes > 3.0 or ghec %}
## 延伸阅读
- [Deploying with GitHub Actions](/actions/deployment/deploying-with-github-actions)
- [Using environments for deployment](/actions/deployment/using-environments-for-deployment){% ifversion fpt or ghec %}
- "[Managing billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions)"{% endif %}
{% endif %}

View File

@@ -3,7 +3,7 @@ title: Deploying with GitHub Actions
intro: Learn how to control deployments with features like environments and concurrency.
versions:
fpt: '*'
ghes: '>=3.1'
ghes: '*'
ghae: '*'
ghec: '*'
type: overview

View File

@@ -76,9 +76,7 @@ On every new push to `main` in your {% data variables.product.company_short %} r
See the documentation for each action used below for the recommended IAM policies for the IAM user, and methods for handling the access key credentials.
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %}
{% endif %}
## Creating the workflow

View File

@@ -66,9 +66,7 @@ This guide explains how to use {% data variables.product.prodname_actions %} to
--settings DOCKER_REGISTRY_SERVER_URL=https://ghcr.io DOCKER_REGISTRY_SERVER_USERNAME=MY_REPOSITORY_OWNER DOCKER_REGISTRY_SERVER_PASSWORD=MY_PERSONAL_ACCESS_TOKEN
```
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %}
{% endif %}
## 创建工作流程

View File

@@ -16,7 +16,6 @@ topics:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## 简介
This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a Java project to [Azure App Service](https://azure.microsoft.com/services/app-service/).
@@ -53,9 +52,7 @@ This guide explains how to use {% data variables.product.prodname_actions %} to
{% data reusables.actions.create-azure-publish-profile %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
1. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %}
{% endif %}
## 创建工作流程
@@ -98,7 +95,7 @@ jobs:
run: mvn clean install
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: java-app
path: '{% raw %}${{ github.workspace }}{% endraw %}/target/*.jar'
@@ -112,7 +109,7 @@ jobs:
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: java-app
@@ -129,6 +126,6 @@ jobs:
以下资源也可能有用:
* For the original starter workflow, see [`azure-webapps-java-jar.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-java-jar.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository.
* 有关原始入门工作流程,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 仓库中的 [`azure-webapps-java-jar.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-java-jar.yml)
* 用于部署 Web 应用的操作是正式的 Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) 操作。
* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository.

View File

@@ -15,7 +15,6 @@ topics:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## 简介
This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a .NET project to [Azure App Service](https://azure.microsoft.com/services/app-service/).
@@ -52,9 +51,7 @@ This guide explains how to use {% data variables.product.prodname_actions %} to
{% data reusables.actions.create-azure-publish-profile %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %}
{% endif %}
## 创建工作流程
@@ -108,7 +105,7 @@ jobs:
run: dotnet publish -c Release -o {% raw %}${{env.DOTNET_ROOT}}{% endraw %}/myapp
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: .net-app
path: {% raw %}${{env.DOTNET_ROOT}}{% endraw %}/myapp
@@ -122,7 +119,7 @@ jobs:
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: .net-app
@@ -139,6 +136,6 @@ jobs:
以下资源也可能有用:
* For the original starter workflow, see [`azure-webapps-dotnet-core.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-dotnet-core.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository.
* 有关原始入门工作流程,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 仓库中的 [`azure-webapps-dotnet-core.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-dotnet-core.yml)
* 用于部署 Web 应用的操作是正式的 Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) 操作。
* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository.

View File

@@ -21,7 +21,6 @@ topics:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## 简介
This guide explains how to use {% data variables.product.prodname_actions %} to build, test, and deploy a Node.js project to [Azure App Service](https://azure.microsoft.com/services/app-service/).
@@ -58,9 +57,7 @@ This guide explains how to use {% data variables.product.prodname_actions %} to
{% data reusables.actions.create-azure-publish-profile %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %}
{% endif %}
## 创建工作流程
@@ -103,7 +100,7 @@ jobs:
npm run build --if-present
npm run test --if-present
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: node-app
path: .
@@ -117,7 +114,7 @@ jobs:
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: node-app
@@ -134,7 +131,7 @@ jobs:
以下资源也可能有用:
* For the original starter workflow, see [`azure-webapps-node.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-node.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository.
* 有关原始入门工作流程,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 仓库中的 [`azure-webapps-node.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-node.yml)
* 用于部署 Web 应用的操作是正式的 Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) 操作。
* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository.
* The "[Create a Node.js web app in Azure](https://docs.microsoft.com/azure/app-service/quickstart-nodejs)" quickstart in the Azure web app documentation demonstrates using VS Code with the [Azure App Service extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice).
* Azure web 应用文档中的“[在 Azure 中创建 Node.js web 应用](https://docs.microsoft.com/azure/app-service/quickstart-nodejs)”快速入门说明如何通过 [Azure App Service 扩展](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice)使用 VS Code。

View File

@@ -15,7 +15,6 @@ topics:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## 简介
This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a PHP project to [Azure App Service](https://azure.microsoft.com/services/app-service/).
@@ -52,9 +51,7 @@ This guide explains how to use {% data variables.product.prodname_actions %} to
{% data reusables.actions.create-azure-publish-profile %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %}
{% endif %}
## 创建工作流程
@@ -119,7 +116,7 @@ jobs:
run: composer validate --no-check-publish && composer install --prefer-dist --no-progress
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: php-app
path: .
@@ -133,7 +130,7 @@ jobs:
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: php-app
@@ -150,6 +147,6 @@ jobs:
以下资源也可能有用:
* For the original starter workflow, see [`azure-webapps-php.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-php.yml) in the {% data variables.product.prodname_actions %} `starter-workflows` repository.
* 有关原始入门工作流程,请参阅 {% data variables.product.prodname_actions %} `starter-workflows` 仓库中的 [`azure-webapps-php.yml`](https://github.com/actions/starter-workflows/blob/main/deployments/azure-webapps-php.yml)
* 用于部署 Web 应用的操作是正式的 Azure [`Azure/webapps-deploy`](https://github.com/Azure/webapps-deploy) 操作。
* For more examples of GitHub Action workflows that deploy to Azure, see the [actions-workflow-samples](https://github.com/Azure/actions-workflow-samples) repository.

View File

@@ -16,7 +16,6 @@ topics:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## 简介
This guide explains how to use {% data variables.product.prodname_actions %} to build and deploy a Python project to [Azure App Service](https://azure.microsoft.com/services/app-service/).
@@ -55,9 +54,7 @@ This guide explains how to use {% data variables.product.prodname_actions %} to
1. Add an app setting called `SCM_DO_BUILD_DURING_DEPLOYMENT` and set the value to `1`.
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
5. Optionally, configure a deployment environment. {% data reusables.actions.about-environments %}
{% endif %}
## 创建工作流程
@@ -114,7 +111,7 @@ jobs:
# Optional: Add a step to run tests here (PyTest, Django test suites, etc.)
- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: python-app
path: |
@@ -129,7 +126,7 @@ jobs:
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: python-app
path: .

View File

@@ -120,11 +120,9 @@ Store the name of your project as a secret named `GKE_PROJECT`. For more informa
### (可选)配置 kustomize
Kustomize 是用于管理 YAML 规范的可选工具。 After creating a `kustomization` file, the workflow below can be used to dynamically set fields of the image and pipe in the result to `kubectl`. 更多信息请参阅 [kustomize 的用法](https://github.com/kubernetes-sigs/kustomize#usage)。
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
### (Optional) Configure a deployment environment
{% data reusables.actions.about-environments %}
{% endif %}
## 创建工作流程

View File

@@ -15,7 +15,7 @@ redirect_from:
---
您可以通过 {% ifversion fpt or ghae or ghes > 3.0 or ghec %}{% data variables.product.prodname_actions %} 和环境或使用 {% endif %} REST API 和第三方应用程序来交付部署。 {% ifversion fpt or ghae ghes > 3.0 or ghec %}For more information about using environments to deploy with {% data variables.product.prodname_actions %}, see "[Using environments for deployment](/actions/deployment/using-environments-for-deployment)." {% endif %}有关使用 REST API 进行部署的更多信息,请参阅“[仓库](/rest/reference/repos#deployments)”。
You can deliver deployments through {% data variables.product.prodname_actions %} and environments or with the REST API and third party apps. {% ifversion fpt or ghae ghes > 3.0 or ghec %}For more information about using environments to deploy with {% data variables.product.prodname_actions %}, see "[Using environments for deployment](/actions/deployment/using-environments-for-deployment)." {% endif %}有关使用 REST API 进行部署的更多信息,请参阅“[仓库](/rest/reference/repos#deployments)”。
要查看当前和过去的部署,请在仓库的主页上单击 **Environments环境**
{% ifversion ghae %}

View File

@@ -164,7 +164,7 @@ You can configure a subject that filters for a specific [environment](/actions/d
#### Filtering for `pull_request` events
The subject claim includes the `pull_request` string when the workflow is triggered by a pull request event.
The subject claim includes the `pull_request` string when the workflow is triggered by a pull request event, but only if the job doesn't reference an environment.
You can configure a subject that filters for the [`pull_request`](/actions/learn-github-actions/events-that-trigger-workflows#pull_request) event. In this example, the workflow run must have been triggered by a `pull_request` event in a repository named `octo-repo` that is owned by the `octo-org` organization:

View File

@@ -10,7 +10,7 @@ redirect_from:
- /actions/deployment/using-environments-for-deployment
versions:
fpt: '*'
ghes: '>=3.1'
ghes: '*'
ghae: '*'
ghec: '*'
---

View File

@@ -13,7 +13,8 @@ learningTracks:
- continuous_integration
- continuous_deployment
- deploy_to_the_cloud
- '{% ifversion ghec or ghes or ghae %}adopting_github_actions_for_your_enterprise{% endif %}'
- adopting_github_actions_for_your_enterprise_ghec
- adopting_github_actions_for_your_enterprise_ghes_and_ghae
- hosting_your_own_runners
- create_actions
includeGuides:

View File

@@ -12,13 +12,16 @@ versions:
type: overview
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## About self-hosted runners
{% data reusables.actions.self-hosted-runner-description %} Self-hosted runners can be physical, virtual, in a container, on-premises, or in a cloud.
A self-hosted runner is a system that you deploy and manage to execute jobs from {% data variables.product.prodname_actions %} on {% ifversion ghae or ghec %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}. For more information about {% data variables.product.prodname_actions %}, see "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions){% ifversion fpt %}."{% elsif ghec or ghes or ghae %}" and "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)."{% endif %}
{% data reusables.actions.self-hosted-runner-description %} {% data reusables.actions.self-hosted-runner-locations %}
{% data reusables.actions.self-hosted-runner-architecture %} {% data reusables.actions.runner-app-open-source %} When a new version is released, the runner application automatically updates itself when a job is assigned to the runner, or within a week of release if the runner hasn't been assigned any jobs.
You can add self-hosted runners at various levels in the management hierarchy:
- Repository-level runners are dedicated to a single repository.
@@ -59,7 +62,7 @@ You can use any machine as a self-hosted runner as long at it meets these requir
* The machine has enough hardware resources for the type of workflows you plan to run. The self-hosted runner application itself only requires minimal resources.
* If you want to run workflows that use Docker container actions or service containers, you must use a Linux machine and Docker must be installed.
{% ifversion fpt or ghes > 3.2 or ghec %}
{% ifversion fpt or ghes > 3.2 or ghec or ghae-issue-4462 %}
## Autoscaling your self-hosted runners
You can automatically increase or decrease the number of self-hosted runners in your environment in response to the webhook events you receive. For more information, see "[Autoscaling with self-hosted runners](/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners)."
@@ -133,12 +136,7 @@ The self-hosted runner polls {% data variables.product.product_name %} to retrie
{% data reusables.actions.self-hosted-runner-ports-protocols %}
{% ifversion ghae %}
You must ensure that the self-hosted runner has appropriate network access to communicate with the {% data variables.product.prodname_ghe_managed %} URL and its subdomains.
For example, if your instance name is `octoghae`, then you will need to allow the self-hosted runner to access `octoghae.githubenterprise.com`, `api.octoghae.githubenterprise.com`, and `codeload.octoghae.githubenterprise.com`.
If you use an IP address allow list for your {% data variables.product.prodname_dotcom %} organization or enterprise account, you must add your self-hosted runner's IP address to the allow list. For more information, see "[Managing allowed IP addresses for your organization](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization#using-github-actions-with-an-ip-allow-list)."
{% endif %}
{% data reusables.actions.self-hosted-runner-communications-for-ghae %}
{% ifversion fpt or ghec %}
@@ -242,3 +240,11 @@ Untrusted workflows running on your self-hosted runner pose significant security
* Persisting unwanted or dangerous data on the machine.
For more information about security hardening for self-hosted runners, see "[Security hardening for {% data variables.product.prodname_actions %}](/actions/security-guides/security-hardening-for-github-actions#hardening-for-self-hosted-runners)."
{% ifversion ghec or ghes or ghae %}
## Further reading
- "[Getting started with self-hosted runners for your enterprise](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-self-hosted-runners-for-your-enterprise)"
{% endif %}

View File

@@ -13,7 +13,6 @@ type: tutorial
shortTitle: Add self-hosted runners
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
@@ -33,6 +32,16 @@ For more information, see "[About self-hosted runners](/github/automating-your-w
{% endwarning %}
{% endif %}
{% ifversion fpt or ghec or ghes > 3.2 %}
You can set up automation to scale the number of self-hosted runners. For more information, see "[Autoscaling with self-hosted runners](/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners)."
{% endif %}
## Prerequisites
{% data reusables.actions.self-hosted-runners-prerequisites %}
## Adding a self-hosted runner to a repository
You can add self-hosted runners to a single repository. To add a self-hosted runner to a user repository, you must be the repository owner. For an organization repository, you must be an organization owner or have admin access to the repository. For information about how to add a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)."
@@ -53,6 +62,8 @@ You can add self-hosted runners to a single repository. To add a self-hosted run
{% endif %}
{% data reusables.actions.self-hosted-runner-check-installation-success %}
For more information, see "[Monitoring and troubleshooting self-hosted runners](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners)."
## Adding a self-hosted runner to an organization
You can add self-hosted runners at the organization level, where they can be used to process jobs for multiple repositories in an organization. To add a self-hosted runner to an organization, you must be an organization owner. For information about how to add a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)."
@@ -71,9 +82,10 @@ You can add self-hosted runners at the organization level, where they can be use
1. Under {% ifversion ghes > 3.1 or ghae %}"Runners", click **Add new**, then click **New runner**.{% elsif ghes < 3.2 %}"Self-hosted runners", click **Add runner**."{% endif %}
{% data reusables.actions.self-hosted-runner-configure %}
{% endif %}
{% data reusables.actions.self-hosted-runner-check-installation-success %}
For more information, see "[Monitoring and troubleshooting self-hosted runners](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners)."
{% data reusables.actions.self-hosted-runner-public-repo-access %}
## Adding a self-hosted runner to an enterprise
@@ -81,29 +93,20 @@ You can add self-hosted runners at the organization level, where they can be use
{% ifversion fpt %}If you use {% data variables.product.prodname_ghe_cloud %}, you{% elsif ghec or ghes or ghae %}You{% endif %} can add self-hosted runners to an enterprise, where they can be assigned to multiple organizations. The organization admins are then able to control which repositories can use it. {% ifversion fpt %}For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-enterprise).{% endif %}
{% ifversion ghec or ghes or ghae %}
New runners are assigned to the default group. You can modify the runner's group after you've registered the runner. For more information, see "[Managing access to self-hosted runners](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)."
{% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}
To add a self-hosted runner to an enterprise account, you must be an enterprise owner. For information about how to add a self-hosted runner with the REST API, see the enterprise endpoints in the [{% data variables.product.prodname_actions %} REST API](/rest/reference/actions#self-hosted-runners).
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.actions-tab %}
{% data reusables.enterprise-accounts.actions-runners-tab %}
1. Click **New runner**.
{% data reusables.actions.self-hosted-runner-configure %}
{% elsif ghae or ghes < 3.4 %}
To add a self-hosted runner at the enterprise level of {% data variables.product.product_location %}, you must be a site administrator.
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.actions-tab %}
{% data reusables.enterprise-accounts.actions-runners-tab %}
1. Click **Add new**, then click **New runner**.
{% data reusables.actions.self-hosted-runner-configure %}
To add a self-hosted runner to an enterprise, you must be an enterprise owner. For information about how to add a self-hosted runner with the REST API, see the enterprise endpoints in the [{% data variables.product.prodname_actions %} REST API](/rest/reference/actions#self-hosted-runners).
{% endif %}
{% data reusables.actions.self-hosted-runner-add-to-enterprise %}
{% data reusables.actions.self-hosted-runner-check-installation-success %}
For more information, see "[Monitoring and troubleshooting self-hosted runners](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners)."
{% data reusables.actions.self-hosted-runner-public-repo-access %}
### Making enterprise runners available to repositories
@@ -114,3 +117,11 @@ To make an enterprise-level self-hosted runner group available to an organizatio
For more information on changing runner group access settings, see "[Managing access to self-hosted runners using groups](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)."
{% endif %}
{% ifversion ghec or ghes or ghae %}
## Further reading
- "[Getting started with self-hosted runners for your enterprise](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-self-hosted-runners-for-your-enterprise)"
{% endif %}

View File

@@ -5,10 +5,10 @@ versions:
fpt: '*'
ghec: '*'
ghes: '>3.2'
ghae: issue-4462
type: overview
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

View File

@@ -13,7 +13,6 @@ defaultPlatform: linux
shortTitle: 启动时运行运行器应用程序
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

View File

@@ -28,6 +28,5 @@ children:
- /removing-self-hosted-runners
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

View File

@@ -12,7 +12,6 @@ type: tutorial
shortTitle: 管理运行器组
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
@@ -70,17 +69,19 @@ shortTitle: 管理运行器组
![添加运行器组](/assets/images/help/settings/actions-org-add-runner-group.png)
1. 输入运行程序组的名称,并分配仓库访问策略。
{% ifversion ghes or ghae %} 您可以配置一个运行器组可供一组特定的仓库或组织中所有仓库访问。 默认情况下,只有私有仓库可以访问运行器组中的运行器,但您可以覆盖此设置。 如果配置企业共享的组织的运行组,则不能覆盖此设置。{% endif %}
You can configure a runner group to be accessible to a specific list of repositories, or to all repositories in the organization.{% ifversion ghec or ghes %} By default, only private repositories can access runners in a runner group, but you can override this. 如果配置企业共享的组织的运行组,则不能覆盖此设置。{% endif %}
{%- ifversion ghes %}
{% warning %}
**警告**
**Warning**:
{% indented_data_reference reusables.actions.self-hosted-runner-security spaces=3 %}
更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。
{% endwarning %}
{%- endif %}
![添加运行器组选项](/assets/images/help/settings/actions-org-add-runner-group-options.png)
1. 单击 **Save group保存组**创建组并应用策略。
@@ -94,49 +95,29 @@ shortTitle: 管理运行器组
创建组时,必须选择用于定义哪些组织有权访问运行器组的策略。
{% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.actions-tab %}
{% data reusables.enterprise-accounts.actions-runner-groups-tab %}
1. 单击 **New runner group新运行器组**
{% data reusables.actions.runner-group-assign-policy-org %}
{% data reusables.actions.self-hosted-runner-groups-add-to-enterprise-first-steps %}
1. To choose a policy for organization access, select the **Organization access** drop-down, and click a policy. You can configure a runner group to be accessible to a specific list of organizations, or all organizations in the enterprise.{% ifversion ghes %} By default, only private repositories can access runners in a runner group, but you can override this.{% endif %}
{%- ifversion ghec or ghes %}
{% warning %}
**警告**
**Warning**:
{% indented_data_reference reusables.actions.self-hosted-runner-security spaces=3 %}
更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。
{% endwarning %}
{% data reusables.actions.self-hosted-runner-create-group %}
{% elsif ghae or ghes < 3.4 %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.actions-tab %}
{% data reusables.enterprise-accounts.actions-runners-tab %}
1. 单击 **Add new新增**,然后单击 **New group新组**
{%- endif %}
{%- ifversion ghec or ghes %}
![添加运行器组](/assets/images/help/settings/actions-enterprise-account-add-runner-group.png)
1. 输入运行程序组的名称,并分配组织访问策略。
![添加运行器组选项](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options.png)
{%- elsif ghae %}
您可以配置运行器组供特定的组织列表或企业中所有组织访问。 默认情况下,只有私有仓库可以访问运行器组中的运行器,但您可以覆盖此设置。 如果配置企业共享的组织的运行组,则不能覆盖此设置。
{% warning %}
**警告**
{% indented_data_reference reusables.actions.self-hosted-runner-security spaces=3 %}
更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。
{% endwarning %}
![添加运行器组选项](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options.png)
![添加运行器组选项](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options-ae.png)
{%- endif %}
1. 单击 **Save group保存组**创建组并应用策略。
{% endif %}
{% endif %}
## 更改自托管运行器组的访问策略
@@ -147,15 +128,17 @@ shortTitle: 管理运行器组
{% data reusables.actions.settings-sidebar-actions-runner-groups-selection %}
1. 修改访问选项或更改运行器组名称。
{%- ifversion fpt or ghec or ghes %}
{% warning %}
**警告**
**Warning**:
{% indented_data_reference reusables.actions.self-hosted-runner-security spaces=3 %}
更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。
{% endwarning %}
{%- endif %}
{% elsif ghae or ghes < 3.4 %}
{% data reusables.actions.self-hosted-runner-configure-runner-group-access %}
{% endif %}
@@ -182,7 +165,7 @@ shortTitle: 管理运行器组
{% data reusables.actions.self-hosted-runner-navigate-to-org-enterprise %}
{% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}
1. 在“Runners运行器”列表中单击您要配置的运行器。
2. 选择运行器组下拉菜单。
2. Select the **Runner group** drop-down.
3. 在“Move runner to group将运行器移动到组”中选择运行器的目的地组。
{% elsif ghae or ghes < 3.4 %}
1. 在设置页面的{% ifversion ghes > 3.1 or ghae %}“Runners groups运行器组”{% elsif ghes < 3.2 %}“Self-hosted runners自托管运行器”{% endif %} 部分,找到要移动的运行器的当前组,并展开组成员列表。 ![查看运行器组成员](/assets/images/help/settings/actions-org-runner-group-members.png)

View File

@@ -15,7 +15,6 @@ defaultPlatform: linux
shortTitle: Monitor & troubleshoot
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

View File

@@ -13,7 +13,6 @@ type: tutorial
shortTitle: 删除自托管的运行器
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

View File

@@ -12,7 +12,6 @@ type: tutorial
shortTitle: 代理服务器
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

View File

@@ -10,7 +10,6 @@ type: tutorial
shortTitle: 标签运行器
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

View File

@@ -13,7 +13,6 @@ type: tutorial
shortTitle: 在工作流程中使用运行器
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

View File

@@ -501,7 +501,7 @@ jobs:
./build.sh --log-path ${{ runner.temp }}/build_logs
- name: Upload logs on fail
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Build failure logs
path: ${{ runner.temp }}/build_logs
@@ -583,7 +583,7 @@ jobs:
- uses: actions/checkout@v2
- run: npm test > test-job-${{ strategy.job-index }}.txt
- name: Upload logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Build log for job ${{ strategy.job-index }}
path: test-job-${{ strategy.job-index }}.txt

View File

@@ -75,7 +75,7 @@ jobs:
run: |
expr 1 + 1 > output.log
- name: Upload output file
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: output-log-file
path: output.log
@@ -88,7 +88,7 @@ jobs:
example-job:
steps:
- name: Download a single artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: output-log-file
```

View File

@@ -26,8 +26,22 @@ topics:
{% data variables.product.prodname_actions %} 不仅仅是 DevOps还允许您在存储库中发生其他事件时运行工作流程。 例如,您可以运行工作流程,以便在有人在您的存储库中创建新问题时自动添加相应的标签。
{% ifversion fpt or ghec %}
{% data variables.product.prodname_dotcom %} 提供 Linux、Windows 和 macOS 虚拟机来运行工作流程,或者您可以在自己的数据中心或云基础架构中托管自己的自托管运行器。
{% elsif ghes or ghae %}
You must host your own Linux, Windows, or macOS virtual machines to run workflows for {% data variables.product.product_location %}. {% data reusables.actions.self-hosted-runner-locations %}
{% endif %}
{% ifversion ghec or ghes or ghae %}
For more information about introducing {% data variables.product.prodname_actions %} to your enterprise, see "[Introducing {% data variables.product.prodname_actions %} to your enterprise](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise)."
{% endif %}
## {% data variables.product.prodname_actions %} 的组件
您可以将 {% data variables.product.prodname_actions %} _工作流程_配置为在存储库中发生_事件_时触发例如打开拉取请求或创建议题。 工作流程包含一个或多个_作业_这些作业可以按顺序运行也可以并行运行。 每个作业都将在其自己的虚拟机_运行器_中运行或者在容器内运行并且具有一个或多个_步骤_ 这些步骤要么运行您定义的脚本要么运行_操作_这是一个可重用的扩展可以简化您的工作流程。
@@ -225,22 +239,14 @@ _操作_是 {% data variables.product.prodname_actions %} 平台的自定义应
## 查看工作流程的活动
工作流程开始运行后,您可以{% ifversion fpt or ghes > 3.0 or ghae or ghec %}查看运行进度的可视化图形,以及{% endif %}查看 {% data variables.product.prodname_dotcom %} 上每个步骤的活动。
Once your workflow has started running, you can see a visualization graph of the run's progress and view each step's activity on {% data variables.product.prodname_dotcom %}.
{% data reusables.repositories.navigate-to-repo %}
1. 在仓库名称下,单击 **Actions操作**。 ![导航到仓库](/assets/images/help/images/learn-github-actions-repository.png)
1. 在左侧边栏中,单击您想要查看的工作流程。 ![工作流程结果的屏幕截图](/assets/images/help/images/learn-github-actions-workflow.png)
1. 在“Workflow runs工作流程运行”下单击您想要查看的运行的名称。 ![工作流程运行的屏幕截图](/assets/images/help/images/learn-github-actions-run.png)
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
1. 在 **Jobs作业**下或可视化图中,单击您要查看的作业。 ![选择作业](/assets/images/help/images/overview-actions-result-navigate.png)
{% endif %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
1. 查看每个步骤的结果。 ![工作流程运行详细信息的屏幕截图](/assets/images/help/images/overview-actions-result-updated-2.png)
{% elsif ghes %}
1. 单击作业名称以查看每个步骤的结果。 ![工作流程运行详细信息的屏幕截图](/assets/images/help/images/overview-actions-result-updated.png)
{% else %}
1. 单击作业名称以查看每个步骤的结果。 ![工作流程运行详细信息的屏幕截图](/assets/images/help/images/overview-actions-result.png)
{% endif %}
## 后续步骤

View File

@@ -19,12 +19,7 @@ versions:
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
1. 从工作流程运行列表中,单击您要取消的`已排队``进行中`运行的名称。 ![工作流程运行的名称](/assets/images/help/repository/in-progress-run.png)
1. 在工作流程右上角单击 **Cancel workflow取消工作流程**
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![取消检查套件按钮](/assets/images/help/repository/cancel-check-suite-updated.png)
{% else %}
![取消检查套件按钮](/assets/images/help/repository/cancel-check-suite.png)
{% endif %}
1. 在工作流程右上角单击 **Cancel workflow取消工作流程** ![取消检查套件按钮](/assets/images/help/repository/cancel-check-suite-updated.png)
## {% data variables.product.prodname_dotcom %} 取消工作流程运行所执行的步骤

View File

@@ -23,11 +23,9 @@ shortTitle: 下载工作流程构件
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
1. 在**构件**下,单击您想要下载的构件。
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![下载构件下拉菜单](/assets/images/help/repository/artifact-drop-down-updated.png)
{% else %}
![下载构件下拉菜单](/assets/images/help/repository/artifact-drop-down.png)
{% endif %}
{% endwebui %}

View File

@@ -1,7 +1,7 @@
---
title: 管理工作流程运行
shortTitle: 管理工作流程运行
intro: '您可以重新运行或取消工作流程、{% ifversion fpt or ghes > 3.0 or ghae %}审核部署、{% endif %}查看可计费作业执行分钟数和下载工件。'
intro: '您可以重新运行或取消工作流程、{% ifversion fpt or ghes or ghae %}审核部署、{% endif %}查看可计费作业执行分钟数和下载工件。'
redirect_from:
- /actions/configuring-and-managing-workflows/managing-a-workflow-run
- /articles/managing-a-workflow-run

View File

@@ -29,11 +29,9 @@ shortTitle: Remove workflow artifacts
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
1. Under **Artifacts**, click {% octicon "trash" aria-label="The trash icon" %} next to the artifact you want to remove.
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![Delete artifact drop-down menu](/assets/images/help/repository/actions-delete-artifact-updated.png)
{% else %}
![Delete artifact drop-down menu](/assets/images/help/repository/actions-delete-artifact.png)
{% endif %}
## Setting the retention period for an artifact

View File

@@ -4,7 +4,7 @@ intro: You can approve or reject jobs awaiting review.
product: '{% data reusables.gated-features.environments %}'
versions:
fpt: '*'
ghes: '>=3.1'
ghes: '*'
ghae: '*'
ghec: '*'
---

View File

@@ -158,7 +158,7 @@ GitHub Actions
{% raw %}
```yaml
- name: Upload math result for job 1
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: homework
path: math-homework.txt
@@ -166,7 +166,7 @@ GitHub Actions
...
- name: Download math result for job 1
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: homework
```

View File

@@ -391,7 +391,7 @@ artifacts:
{% raw %}
```yaml
- name: Upload math result for job 1
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: homework
path: math-homework.txt

View File

@@ -187,7 +187,7 @@ Travis CI 和 {% data variables.product.prodname_actions %} 可以将自定义
### 存储密码
{% data variables.product.prodname_actions %} 允许您存储密码并在作业中引用它们。 {% data variables.product.prodname_actions %} 组织可以限制哪些仓库能够访问组织机密。 {% ifversion fpt or ghes > 3.0 or ghae or ghec %}环境保护规则可能需要手动批准工作流程才能访问环境秘密。 {% endif %}更多信息请参阅“[加密密码](/actions/reference/encrypted-secrets)”。
{% data variables.product.prodname_actions %} 允许您存储密码并在作业中引用它们。 {% data variables.product.prodname_actions %} 组织可以限制哪些仓库能够访问组织机密。 Environment protection rules can require manual approval for a workflow to access environment secrets. 更多信息请参阅“[加密密码](/actions/reference/encrypted-secrets)”。
### 在作业和工作流程之间共享文件

View File

@@ -16,9 +16,7 @@ versions:
这些额外的日志将通过在包含工作流程的仓库中设置密码来启用,因此将应用相同的权限要求:
- {% data reusables.actions.permissions-statement-secrets-repository %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
- {% data reusables.actions.permissions-statement-secrets-environment %}
{% endif %}
- {% data reusables.actions.permissions-statement-secrets-organization %}
- {% data reusables.actions.permissions-statement-secrets-api %}

View File

@@ -5,7 +5,7 @@ redirect_from:
- /actions/managing-workflow-runs/using-the-visualization-graph
versions:
fpt: '*'
ghes: '>=3.1'
ghes: '*'
ghae: '*'
ghec: '*'
shortTitle: 使用可视化图表

View File

@@ -31,11 +31,11 @@ versions:
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow-superlinter %}
{% data reusables.repositories.view-run-superlinter %}
{% data reusables.repositories.navigate-to-job-superlinter %}
{% data reusables.repositories.view-failed-job-results-superlinter %}
{% data reusables.repositories.view-specific-line-superlinter %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
{% data reusables.repositories.navigate-to-job %}
{% data reusables.repositories.view-failed-job-results %}
{% data reusables.repositories.view-specific-line %}
## 搜索日志
@@ -43,15 +43,10 @@ versions:
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow-superlinter %}
{% data reusables.repositories.view-run-superlinter %}
{% data reusables.repositories.navigate-to-job-superlinter %}
1. 在日志输出的右上角,在 **Search logs搜索日志**搜索框中输入搜索查询。
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![搜索日志的搜索框](/assets/images/help/repository/search-log-box-updated-2.png)
{% else %}
![搜索日志的搜索框](/assets/images/help/repository/search-log-box-updated.png)
{% endif %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
{% data reusables.repositories.navigate-to-job %}
1. 在日志输出的右上角,在 **Search logs搜索日志**搜索框中输入搜索查询。 ![搜索日志的搜索框](/assets/images/help/repository/search-log-box-updated-2.png)
## 下载日志
@@ -59,15 +54,13 @@ versions:
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow-superlinter %}
{% data reusables.repositories.view-run-superlinter %}
{% data reusables.repositories.navigate-to-job-superlinter %}
1. In the upper right corner, click {% ifversion fpt or ghes > 3.0 or ghae or ghec %}{% octicon "gear" aria-label="The gear icon" %}{% else %}{% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}{% endif %} and select **Download log archive**.
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
{% data reusables.repositories.navigate-to-job %}
1. In the upper right corner, click {% octicon "gear" aria-label="The gear icon" %} and select **Download log archive**.
![下载日志下拉菜单](/assets/images/help/repository/download-logs-drop-down-updated-2.png)
{% else %}
![下载日志下拉菜单](/assets/images/help/repository/download-logs-drop-down-updated.png)
{% endif %}
## 删除日志
@@ -75,20 +68,16 @@ versions:
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow-superlinter %}
{% data reusables.repositories.view-run-superlinter %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
1. In the upper right corner, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}.
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![烤肉串水平图标](/assets/images/help/repository/workflow-run-kebab-horizontal-icon-updated-2.png)
{% else %}
![烤肉串水平图标](/assets/images/help/repository/workflow-run-kebab-horizontal-icon-updated.png)
{% endif %}
2. 要删除日志文件,单击 **Delete all logs删除所有日志**按钮并审查确认提示。
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![删除所有日志](/assets/images/help/repository/delete-all-logs-updated-2.png)
{% else %}
![删除所有日志](/assets/images/help/repository/delete-all-logs-updated.png)
{% endif %}
删除日志后,**Delete all logs删除所有日志** 按钮将会移除,以表示在工作流程运行中没有日志文件。
## 使用 {% data variables.product.prodname_cli %} 查看日志

View File

@@ -1,6 +1,6 @@
---
title: 加密机密
intro: '加密密码可让您将敏感信息存储在您的组织{% ifversion fpt or ghes > 3.0 or ghec %}、仓库或者仓库环境{% else %} 或仓库{% endif %} 中。'
intro: 'Encrypted secrets allow you to store sensitive information in your organization{% ifversion fpt or ghes or ghec %}, repository, or repository environments{% else %} or repository{% endif %}.'
redirect_from:
- /github/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
- /actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets
@@ -19,13 +19,11 @@ versions:
## 关于加密密码
机密是您在组织{% ifversion fpt or ghes > 3.0 or ghae or ghec %}、仓库或者仓库环境{% else %} 或仓库{% endif %} 中创建的加密环境变量。 您创建的机密可用于 {% data variables.product.prodname_actions %} 工作流程。 在机密到达 {% data variables.product.prodname_dotcom %} 之前,{% data variables.product.prodname_dotcom %} 使用 [libsodium 密封盒](https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes)对机密加密,并且在您于工作流程中使用它们之前一直保持加密状态。
Secrets are encrypted environment variables that you create in an organization, repository, or repository environment. 您创建的机密可用于 {% data variables.product.prodname_actions %} 工作流程。 在机密到达 {% data variables.product.prodname_dotcom %} 之前,{% data variables.product.prodname_dotcom %} 使用 [libsodium 密封盒](https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes)对机密加密,并且在您于工作流程中使用它们之前一直保持加密状态。
{% data reusables.actions.secrets-org-level-overview %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
对于存储在环境级别的机密,您可以启用所需的审查者来控制对机密的访问。 在必要的审查者授予批准之前,工作流程作业无法访问环境机密。
{% endif %}
{% ifversion fpt or ghec or ghae-issue-4856 %}
@@ -41,29 +39,27 @@ versions:
{% data reusables.codespaces.secrets-naming %}
例如,{% ifversion fpt or ghes > 3.0 or ghae or ghec %}在环境级别创建的机密必须在环境中具有唯一的名称,{% endif %}在仓库级别创建的机密必须在该仓库中具有唯一的名称,而在组织级别创建的机密必须在该级别具有独特的名称。
For example, a secret created at the environment level must have a unique name in that environment, a secret created at the repository level must have a unique name in that repository, and a secret created at the organization level must have a unique name at that level.
{% data reusables.codespaces.secret-precedence %}{% ifversion fpt or ghes > 3.0 or ghae or ghec %}同样,如果组织、仓库和环境都具有同名的密钥,则环境级密钥优先。{% endif %}
{% data reusables.codespaces.secret-precedence %} Similarly, if an organization, repository, and environment all have a secret with the same name, the environment-level secret takes precedence.
为帮助确保 {% data variables.product.prodname_dotcom %} 在日志中编写密码,请勿将结构化数据用作密码的值。 例如,避免创建包含 JSON 或编码 Git blob 的密码。
### 访问您的密码
为使密码用于操作,必须将密码设置为工作流程文件中的输入或环境变量。 查看操作的自述文件以了解操作预期的输入和环境变量。 更多信息请参阅“[{% data variables.product.prodname_actions %} 的工作流程语法](/articles/workflow-syntax-for-github-actions/#jobsjob_idstepsenv)”。
为使密码用于操作,必须将密码设置为工作流程文件中的输入或环境变量。 查看操作的自述文件以了解操作预期的输入和环境变量。 For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/articles/workflow-syntax-for-github-actions/#jobsjob_idstepsenv)."
如果您拥有编辑文件的权限,便可在工作流程文件中使用和读取加密密码。 更多信息请参阅“[{% data variables.product.prodname_dotcom %} 上的访问权限](/github/getting-started-with-github/access-permissions-on-github)”。
{% data reusables.actions.secrets-redaction-warning %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
当工作流程运行排队时读取组织和仓库机密,在引用环境的作业开始时读取环境机密。
{% endif %}
您还可以使用 REST API 管理密码。 更多信息请参阅“[密码](/rest/reference/actions#secrets)”。
您还可以使用 REST API 管理密码。 For more information, see "[Secrets](/rest/reference/actions#secrets)."
### 限制凭据权限
生成凭据时,建议尽可能授予最低的权限。 例如,不使用个人凭据,而使用[部署密钥](/developers/overview/managing-deploy-keys#deploy-keys)或服务帐户。 请考虑授予只读权限(如果这是所需的全部权限)并尽可能限制访问。 生成个人访问令牌 (PAT) 时,选择所需的最小范围。
生成凭据时,建议尽可能授予最低的权限。 For example, instead of using personal credentials, use [deploy keys](/developers/overview/managing-deploy-keys#deploy-keys) or a service account. 请考虑授予只读权限(如果这是所需的全部权限)并尽可能限制访问。 生成个人访问令牌 (PAT) 时,选择所需的最小范围。
{% note %}
@@ -85,7 +81,7 @@ versions:
1. 输入密码的值。
1. 单击 **Add secret添加密码**
如果您的仓库 {% ifversion fpt or ghes > 3.0 or ghae or ghec %}拥有环境机密或 {% endif %}可以访问父组织中的机密,则这些机密也会列入本页。
If your repository has environment secrets or can access secrets from the parent organization, then those secrets are also listed on this page.
{% endwebui %}
@@ -109,8 +105,6 @@ gh secret set <em>secret-name</em> < secret.txt
{% endcli %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
## 为环境创建加密密码
{% data reusables.actions.permissions-statement-secrets-environment %}
@@ -144,8 +138,6 @@ gh secret list --env <em>environment-name</em>
{% endcli %}
{% endif %}
## 为组织创建加密密码
在组织中创建密码时,可以使用策略来限制可以访问该密码的仓库。 例如,您可以将访问权限授予所有仓库,也可以限制仅私有仓库或指定的仓库列表拥有访问权限。
@@ -217,7 +209,7 @@ gh secret list --org <em>organization-name</em>
{% note %}
**注:**{% data reusables.actions.forked-secrets %}
**Note:** {% data reusables.actions.forked-secrets %}
{% endnote %}
@@ -234,7 +226,7 @@ steps:
```
{% endraw %}
尽可能避免使用命令行在进程之间传递密码。 命令行进程可能对其他用户可见(使用 `ps` 命令)或通过[安全审计事件](https://docs.microsoft.com/windows-server/identity/ad-ds/manage/component-updates/command-line-process-auditing)获取。 为帮助保护密码,请考虑使用环境变量 `STDIN` 或目标进程支持的其他机制。
尽可能避免使用命令行在进程之间传递密码。 Command-line processes may be visible to other users (using the `ps` command) or captured by [security audit events](https://docs.microsoft.com/windows-server/identity/ad-ds/manage/component-updates/command-line-process-auditing). 为帮助保护密码,请考虑使用环境变量 `STDIN` 或目标进程支持的其他机制。
如果必须在命令行中传递密码,则将它们包含在适当的引用规则中。 密码通常包含可能意外影响 shell 的特殊字符。 要转义这些特殊字符,请引用环境变量。 例如:
@@ -279,19 +271,19 @@ steps:
## 密码的限制
您可以存储最多 1,000 个组织密钥{% ifversion fpt or ghes > 3.0 or ghae or ghec %}、100 个仓库密钥和 100 个环境密钥{% else %} 以及 100 个仓库密钥{% endif %}。
You can store up to 1,000 organization secrets, 100 repository secrets, and 100 environment secrets.
在仓库中创建的工作流程可以访问以下数量的密钥:
* 所有100个仓库密钥。
* 如果分配仓库访问超过 100 个组织密钥,则工作流程只能使用前 100 个组织密钥(按密钥名称字母顺序排序)。
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}* 所有 100 个环境密钥。{% endif %}
* All 100 environment secrets.
密码大小限于 64 KB。 要使用大于 64 KB 的密码,可以将加密的密码存储在仓库中,并将解密短语在 {% data variables.product.prodname_dotcom %} 上存储为密码。 例如,在将文件检入您在 {% data variables.product.prodname_dotcom %} 上的仓库之前,可以使用 `gpg` 在本地对您的凭据加密。 更多信息请参阅“[gpg manpage](https://www.gnupg.org/gph/de/manual/r1023.html)”。
{% warning %}
**警告**:请注意,您的密码在操作运行时不会印出。 使用此解决方法时,{% data variables.product.prodname_dotcom %} 不会编写日志中印出的密码。
**Warning**: Be careful that your secrets do not get printed when your action runs. 使用此解决方法时,{% data variables.product.prodname_dotcom %} 不会编写日志中印出的密码。
{% endwarning %}
@@ -355,7 +347,6 @@ steps:
```
{% endraw %}
## Storing Base64 binary blobs as secrets
You can use Base64 encoding to store small binary blobs as secrets. You can then reference the secret in your workflow and decode it for use on the runner. For the size limits, see ["Limits for secrets"](/actions/security-guides/encrypted-secrets#limits-for-secrets).

View File

@@ -25,7 +25,7 @@ miniTocMaxHeadingLevel: 3
## 使用密码
敏感值绝不能以明文存储在工作流程文件中,而应存储为密码。 [密码](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)可在组织{% ifversion fpt or ghes > 3.0 or ghae or ghec %}、仓库或环境{% else %}或仓库{% endif %}级配置,可用于在 {% data variables.product.product_name %} 中存储敏感信息。
敏感值绝不能以明文存储在工作流程文件中,而应存储为密码。 [Secrets](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) can be configured at the organization, repository, or environment level, and allow you to store sensitive information in {% data variables.product.product_name %}.
密码使用 [Libsodium 密封箱](https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes),以使它们在到达 {% data variables.product.product_name %} 前被加密处理。 [使用 UI](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets-for-a-repository) 或通过 [REST API](/rest/reference/actions#secrets) 提交密码时就会发生这种情况。 此客户端加密有助于最大程度地减少与 {% data variables.product.product_name %}基础架构中的意外日志记录相关的风险(例如,异常日志和请求日志等)。 密钥在上传后,{% data variables.product.product_name %} 可对其进行解密,以便它能够被注入工作流程运行时。
@@ -45,10 +45,8 @@ miniTocMaxHeadingLevel: 3
- **审核并轮换注册密码**
- 定期查查已注册的密码,以确认它们仍是必需的。 删除不再需要的密码。
- 定期轮换密码,以减小泄露的密码有效的时间窗。
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
- **考虑要求对访问密码进行审查**
- 您可以使用所需的审查者来保护环境机密。 在审查者批准之前,工作流程作业无法访问环境机密。 For more information about storing secrets in environments or requiring reviews for environments, see "[Encrypted secrets](/actions/reference/encrypted-secrets)" and "[Using environments for deployment](/actions/deployment/using-environments-for-deployment)."
{% endif %}
## 使用 `CODEOWNERS` 监控更改
@@ -175,13 +173,7 @@ For more information, see "[About {% data variables.product.prodname_code_scanni
将操作固定到全长提交 SHA 是当前将操作用作不可变版本的唯一方法。 固定到特定 SHA 有助于降低恶意执行者向操作仓库添加后门的风险,因为他们需要为有效的 Git 对象负载生成 SHA-1 冲突。
{% ifversion ghes < 3.1 %}
{% warning %}
**警告** 提交 SHA 的简短版本不安全,绝不可用于指定操作的 Git 引用。 由于仓库网络的工作方式,任何用户都可以复刻仓库,将精心编写的提交推送到与短 SHA 冲突的仓库。 这会导致该 SHA 上的后续克隆失败,因为它成为不明确的提交。 因此,使用缩短的 SHA 的任何工作流程将立即失败。
{% endwarning %}
{% endif %}
* **审核操作的源代码**
@@ -271,7 +263,7 @@ The attacker server can use the {% ifversion fpt or ghec %}{% data variables.pro
{% ifversion fpt or ghec %}**Self-hosted**{% elsif ghes or ghae %}Self-hosted{% endif %} runners for {% data variables.product.product_name %} do not have guarantees around running in ephemeral clean virtual machines, and can be persistently compromised by untrusted code in a workflow.
{% ifversion fpt or ghec %}As a result, self-hosted runners should almost [never be used for public repositories](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories) on {% data variables.product.product_name %}, because any user can open pull requests against the repository and compromise the environment. Similarly, be{% elsif ghes or ghae %}Be{% endif %} cautious when using self-hosted runners on private or internal repositories, as anyone who can fork the repository and open a pull request (generally those with read-access to the repository) are able to compromise the self-hosted runner environment, including gaining access to secrets and the `GITHUB_TOKEN` which{% ifversion fpt or ghes > 3.1 or ghae or ghec %}, depending on its settings, can grant {% else %} grants {% endif %}write-access permissions on the repository. 尽管工作流程可以通过使用环境和必需的审查来控制对环境密钥的访问,但是这些工作流程不是在隔离的环境中运行,在自托管运行程器上运行时仍然容易遭受相同的风险。
{% ifversion fpt or ghec %}As a result, self-hosted runners should almost [never be used for public repositories](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories) on {% data variables.product.product_name %}, because any user can open pull requests against the repository and compromise the environment. Similarly, be{% elsif ghes or ghae %}Be{% endif %} cautious when using self-hosted runners on private or internal repositories, as anyone who can fork the repository and open a pull request (generally those with read access to the repository) are able to compromise the self-hosted runner environment, including gaining access to secrets and the `GITHUB_TOKEN` which{% ifversion fpt or ghes > 3.1 or ghae or ghec %}, depending on its settings, can grant {% else %} grants {% endif %}write access to the repository. 尽管工作流程可以通过使用环境和必需的审查来控制对环境密钥的访问,但是这些工作流程不是在隔离的环境中运行,在自托管运行程器上运行时仍然容易遭受相同的风险。
在组织或企业级别定义自托管运行器时, {% data variables.product.product_name %} 可将多个仓库中的工作流程安排到同一个运行器中。 因此,这些环境的安全危害可能会导致广泛的影响。 为了帮助缩小损害范围,可以通过将自托管运行器组织到单独的组中来创建边界。 更多信息请参阅“[使用组管理对自托管运行器的访问](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups)”。
@@ -285,12 +277,12 @@ The attacker server can use the {% ifversion fpt or ghec %}{% data variables.pro
A self-hosted runner can be added to various levels in your {% data variables.product.prodname_dotcom %} hierarchy: the enterprise, organization, or repository level. This placement determines who will be able to manage the runner:
**Centralised management:**
**Centralized management:**
- If you plan to have a centralized team own the self-hosted runners, then the recommendation is to add your runners at the highest mutual organization or enterprise level. This gives your team a single location to view and manage your runners.
- If you only have a single organization, then adding your runners at the organization level is effectively the same approach, but you might encounter difficulties if you add another organization in the future.
**De-centralised management:**
- If each team will manage their own self-hosted runners, then its recommended that you add the runners at the highest level of team ownership. For example, if each team owns their own organization, then it will be simplest if the runners are added at the organization level too.
**Decentralized management:**
- If each team will manage their own self-hosted runners, then the recommendation is to add the runners at the highest level of team ownership. For example, if each team owns their own organization, then it will be simplest if the runners are added at the organization level too.
- You could also add runners at the repository level, but this will add management overhead and also increases the numbers of runners you need, since you cannot share runners between repositories.
{% ifversion fpt or ghec or ghae-issue-4856 %}

View File

@@ -1,7 +1,7 @@
---
title: Advanced workflow features
shortTitle: Advanced workflow features
intro: '本指南说明如何使用 {% data variables.product.prodname_actions %} 的高级功能,包括机密管理、相关作业、缓存、生成矩阵、{% ifversion fpt or ghes > 3.0 or ghae or ghec %}环境{% endif %}和标签。'
intro: 'This guide shows you how to use the advanced features of {% data variables.product.prodname_actions %}, with secret management, dependent jobs, caching, build matrices, environments, and labels.'
redirect_from:
- /actions/learn-github-actions/managing-complex-workflows
versions:
@@ -169,12 +169,9 @@ To learn more about {% data variables.product.prodname_dotcom %}-hosted runner l
{% data reusables.actions.reusable-workflows %}
{% endif %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
## 使用环境
您可以使用保护规则和机密配置环境。 工作流程中的每个作业都可以引用单个环境。 在将引用环境的作业发送到运行器之前,必须通过为环境配置的任何保护规则。 更多信息请参阅“[使用环境进行部署](/actions/deployment/using-environments-for-deployment)”。
{% endif %}
## Using starter workflows

View File

@@ -39,8 +39,7 @@ Some events have multiple activity types. For these events, you can specify whic
{% data reusables.actions.branch-requirement %}
Runs your workflow when branch protection rules in the workflow repository are changed. For more information about branch protection rules, see "[About protected branches](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)." For information about the branch protection rule APIs, see "[BranchProtectionRule](/graphql/reference/objects#branchprotectionrule)" in the GraphQL API documentation or "[Branches](/rest/reference/branches)" in the REST API documentation.
Runs your workflow when branch protection rules in the workflow repository are changed. 有关分支保护规则的更多信息,请参阅“[关于受保护分支](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)”。 For information about the branch protection rule APIs, see "[BranchProtectionRule](/graphql/reference/objects#branchprotectionrule)" in the GraphQL API documentation or "[Branches](/rest/reference/branches)" in the REST API documentation.
For example, you can run a workflow when a branch protection rule has been `created` or `deleted`:
@@ -558,9 +557,9 @@ on:
### `pull_request`
| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ----------------------------------- |
| [`pull_request`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request) | - `assigned`<br/>- `unassigned`<br/>- `labeled`<br/>- `unlabeled`<br/>- `opened`<br/>- `edited`<br/>- `closed`<br/>- `reopened`<br/>- `synchronize`<br/>- `converted_to_draft`<br/>- `ready_for_review`<br/>- `locked`<br/>- `unlocked` <br/>- `review_requested` <br/>- `review_request_removed`{% ifversion fpt or ghes > 3.0 or ghae or ghec %} <br/>- `auto_merge_enabled` <br/>- `auto_merge_disabled`{% endif %} | `GITHUB_REF` 分支上的最新合并提交 | PR 合并分支 `refs/pull/:prNumber/merge` |
| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ----------------------------------- |
| [`pull_request`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request) | - `assigned`<br/>- `unassigned`<br/>- `labeled`<br/>- `unlabeled`<br/>- `opened`<br/>- `edited`<br/>- `closed`<br/>- `reopened`<br/>- `synchronize`<br/>- `converted_to_draft`<br/>- `ready_for_review`<br/>- `locked`<br/>- `unlocked` <br/>- `review_requested` <br/>- `review_request_removed` <br/>- `auto_merge_enabled` <br/>- `auto_merge_disabled` | `GITHUB_REF` 分支上的最新合并提交 | PR 合并分支 `refs/pull/:prNumber/merge` |
{% note %}
@@ -777,9 +776,9 @@ on:
### `pull_request_target`
| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------ |
| [`pull_request`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request) | - `assigned`<br/>- `unassigned`<br/>- `labeled`<br/>- `unlabeled`<br/>- `opened`<br/>- `edited`<br/>- `closed`<br/>- `reopened`<br/>- `synchronize`<br/>- `converted_to_draft`<br/>- `ready_for_review`<br/>- `locked`<br/>- `unlocked` <br/>- `review_requested` <br/>- `review_request_removed`{% ifversion fpt or ghes > 3.0 or ghae or ghec %} <br/>- `auto_merge_enabled` <br/>- `auto_merge_disabled`{% endif %} | PR 基分支上的最后一次提交 | PR 基础分支 |
| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------ |
| [`pull_request`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#pull_request) | - `assigned`<br/>- `unassigned`<br/>- `labeled`<br/>- `unlabeled`<br/>- `opened`<br/>- `edited`<br/>- `closed`<br/>- `reopened`<br/>- `synchronize`<br/>- `converted_to_draft`<br/>- `ready_for_review`<br/>- `locked`<br/>- `unlocked` <br/>- `review_requested` <br/>- `review_request_removed` <br/>- `auto_merge_enabled` <br/>- `auto_merge_disabled` | PR 基分支上的最后一次提交 | PR 基础分支 |
{% note %}
@@ -1300,7 +1299,6 @@ gh workflow run run-tests.yml -f logLevel=warning -f tags=false -f environment=s
For more information, see the {% data variables.product.prodname_cli %} information in "[Manually running a workflow](/actions/managing-workflow-runs/manually-running-a-workflow)."
{% else %}
此示例定义了 `name` 和 `home` 输入,并使用 `github.event.inputs.name` 和 `github.event.inputs.home` 上下文打印。 如果未提供 `home` 则打印默认值“The Octoverse”。
@@ -1431,7 +1429,7 @@ jobs:
run: |
mkdir -p ./pr
echo $PR_NUMBER > ./pr/pr_number
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: pr_number
path: pr/

View File

@@ -101,14 +101,14 @@ jobs:
npm run build --if-present
npm test
- name: Archive production artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist-without-markdown
path: |
dist
!dist/**/*.md
- name: Archive code coverage results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: output/test/code-coverage.html
@@ -120,7 +120,7 @@ You can define a custom retention period for individual artifacts created by a w
```yaml{:copy}
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: my-artifact
path: my_file.txt
@@ -149,7 +149,7 @@ Specify an artifact's name to download an individual artifact. If you uploaded a
```yaml
- name: Download a single artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: my-artifact
```
@@ -158,7 +158,7 @@ You can also download all artifacts in a workflow run by not specifying a name.
```yaml
- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
```
If you download all workflow run's artifacts, a directory for each artifact is created using its name.
@@ -200,7 +200,7 @@ jobs:
run: |
expr 3 + 7 > math-homework.txt
- name: Upload math result for job 1
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: homework
path: math-homework.txt
@@ -211,7 +211,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Download math result for job 1
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: homework
- shell: bash
@@ -219,7 +219,7 @@ jobs:
value=`cat math-homework.txt`
expr $value \* 9 > math-homework.txt
- name: Upload math result for job 2
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: homework
path: math-homework.txt
@@ -230,7 +230,7 @@ jobs:
runs-on: macOS-latest
steps:
- name: Download math result for job 2
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: homework
- name: Print the final result
@@ -241,11 +241,7 @@ jobs:
```
The workflow run will archive any artifacts that it generated. For more information on downloading archived artifacts, see "[Downloading workflow artifacts](/actions/managing-workflow-runs/downloading-workflow-artifacts)."
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
![Workflow that passes data between jobs to perform math](/assets/images/help/repository/passing-data-between-jobs-in-a-workflow-updated.png)
{% else %}
![Workflow that passes data between jobs to perform math](/assets/images/help/repository/passing-data-between-jobs-in-a-workflow.png)
{% endif %}
{% ifversion fpt or ghec %}

View File

@@ -166,7 +166,6 @@ A string identifier to associate with the secret.
A boolean specifying whether the secret must be supplied.
{% endif %}
## `on.workflow_run.<branches|branches-ignore>`
{% data reusables.actions.workflows.section-specifying-branches %}
@@ -186,6 +185,8 @@ A boolean specifying whether the secret must be supplied.
环境变量的 `map` 可用于工作流程中所有作业的步骤。 您还可以设置仅适用于单个作业的步骤或单个步骤的环境变量。 更多信息请参阅 [`jobs.<job_id>.env`](#jobsjob_idenv) and [`jobs.<job_id>.steps[*].env`](#jobsjob_idstepsenv)。
Variables in the `env` map cannot be defined in terms of other variables in the map.
{% data reusables.repositories.actions-env-var-note %}
### 示例
@@ -240,13 +241,10 @@ env:
{% data reusables.actions.jobs.section-choosing-the-runner-for-a-job %}
{% ifversion fpt or ghes > 3.0 or ghae or ghec %}
## `jobs.<job_id>.environment`
{% data reusables.actions.jobs.section-using-environments-for-jobs %}
{% endif %}
{% ifversion fpt or ghae or ghes > 3.1 or ghec %}
## `jobs.<job_id>.concurrency`

View File

@@ -34,7 +34,7 @@ You can configure {% data variables.product.prodname_code_scanning %} to run {%
## Prerequisites for {% data variables.product.prodname_code_scanning %}
- A license for {% data variables.product.prodname_GH_advanced_security %}{% ifversion ghes > 3.0 %} (see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)"){% endif %}
- A license for {% data variables.product.prodname_GH_advanced_security %}{% ifversion ghes %} (see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)"){% endif %}
- {% data variables.product.prodname_code_scanning_capc %} enabled in the management console (see "[Enabling {% data variables.product.prodname_GH_advanced_security %} for your enterprise](/admin/advanced-security/enabling-github-advanced-security-for-your-enterprise)")
@@ -64,21 +64,18 @@ If you set up the {% data variables.product.prodname_codeql %} action sync tool,
{% endif %}
### Configuring {% data variables.product.prodname_github_connect %} to sync {% data variables.product.prodname_actions %}
1. If you want to download action workflows on demand from {% data variables.product.prodname_dotcom_the_website %}, you need to enable {% data variables.product.prodname_github_connect %}. For more information, see "[Enabling {% data variables.product.prodname_github_connect %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud#enabling-github-connect)."
2. You'll also need to enable {% data variables.product.prodname_actions %} for {% data variables.product.product_location %}. For more information, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server)."
3. The next step is to configure access to actions on {% data variables.product.prodname_dotcom_the_website %} using {% data variables.product.prodname_github_connect %}. For more information, see "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/enterprise/admin/github-actions/enabling-automatic-access-to-githubcom-actions-using-github-connect)."
4. Add a self-hosted runner to your repository, organization, or enterprise account. For more information, see "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)."
## Running code scanning using the {% data variables.product.prodname_codeql_cli %}
If you don't want to use {% data variables.product.prodname_actions %}, you should run {% data variables.product.prodname_code_scanning %} using the {% data variables.product.prodname_codeql_cli %}.
The {% data variables.product.prodname_codeql_cli %} is a command-line tool that you use to analyze codebases on any machine, including a third-party CI/CD system. For more information, see "[Installing CodeQL CLI in your CI system](/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system)."
{% if codeql-runner-supported %}
## Running {% data variables.product.prodname_code_scanning %} using the {% data variables.product.prodname_codeql_runner %}
@@ -89,4 +86,4 @@ If you don't want to use {% data variables.product.prodname_actions %}, you can
The {% data variables.product.prodname_codeql_runner %} is a command-line tool that you can add to your third-party CI/CD system. The tool runs {% data variables.product.prodname_codeql %} analysis on a checkout of a {% data variables.product.prodname_dotcom %} repository. For more information, see "[Running {% data variables.product.prodname_code_scanning %} in your CI system](/github/finding-security-vulnerabilities-and-errors-in-your-code/running-codeql-code-scanning-in-your-ci-system)."
{% endif %}
{% endif %}

View File

@@ -29,10 +29,9 @@ If someone checks a secret with a known pattern into a repository, {% data varia
## Prerequisites for {% data variables.product.prodname_secret_scanning %}
- The [SSSE3](https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf#G3.1106470) (Supplemental Streaming SIMD Extensions 3) CPU flag needs to be enabled on the VM/KVM that runs {% data variables.product.product_location %}.
- A license for {% data variables.product.prodname_GH_advanced_security %}{% ifversion ghes > 3.0 %} (see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)"){% endif %}
- A license for {% data variables.product.prodname_GH_advanced_security %}{% ifversion ghes %} (see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)"){% endif %}
- {% data variables.product.prodname_secret_scanning_caps %} enabled in the management console (see "[Enabling {% data variables.product.prodname_GH_advanced_security %} for your enterprise](/admin/advanced-security/enabling-github-advanced-security-for-your-enterprise)")

View File

@@ -20,10 +20,10 @@ topics:
{% data reusables.advanced-security.ghas-helps-developers %}
{% ifversion ghes > 3.0 %}
{% ifversion ghes %}
为企业启用 {% data variables.product.prodname_GH_advanced_security %} 后,所有组织的仓库管理员都可以启用这些功能,除非您设置了限制访问的策略。 更多信息请参阅“[在企业中执行 {% data variables.product.prodname_advanced_security %} 的策略](/admin/policies/enforcing-policies-for-advanced-security-in-your-enterprise)”。
{% else %}
为企业启用 {% data variables.product.prodname_GH_advanced_security %} 后,所有组织的仓库管理员都可以启用这些功能。 {% ifversion ghes = 3.0 %}更多信息请参阅“[管理组织的安全性和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”或“[管理仓库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)”。{% endif %}
为企业启用 {% data variables.product.prodname_GH_advanced_security %} 后,所有组织的仓库管理员都可以启用这些功能。
{% endif %}
{% ifversion ghes %}
@@ -32,24 +32,16 @@ topics:
## 检查您的许可是否包含 {% data variables.product.prodname_GH_advanced_security %}
{% ifversion ghes > 3.0 %}
{% ifversion ghes %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.license-tab %}
1. 如果您的许可包括 {% data variables.product.prodname_GH_advanced_security %},则许可页面将包括显示当前使用情况详细信息的部分。 ![企业许可证的 {% data variables.product.prodname_GH_advanced_security %} 部分](/assets/images/help/billing/ghas-orgs-list-enterprise-ghes.png)
{% endif %}
{% ifversion ghes = 3.0 %}
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %}
1. 如果您的许可包括 {% data variables.product.prodname_GH_advanced_security %},则左侧边栏中有一个 **{% data variables.product.prodname_advanced_security %}** 条目。 ![高级安全侧边栏](/assets/images/enterprise/management-console/sidebar-advanced-security.png)
{% data reusables.enterprise_management_console.advanced-security-license %}
{% endif %}
## 启用 {% data variables.product.prodname_GH_advanced_security %} 的前提条件
1. 升级 {% data variables.product.product_name %} 许可以包括 {% data variables.product.prodname_GH_advanced_security %}。{% ifversion ghes > 3.0 %}有关许可的更多信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %} 的计费](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)”。{% endif %}
1. 升级 {% data variables.product.product_name %} 许可以包括 {% data variables.product.prodname_GH_advanced_security %}。{% ifversion ghes %}有关许可的更多信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %} 的计费](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)”。{% endif %}
2. 下载新的许可文件。 更多信息请参阅“[下载 {% data variables.product.prodname_enterprise %} 的许可](/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise)”。
3. 将新许可文件上传到 {% data variables.product.product_location %}。 更多信息请参阅“[上传新许可到 {% data variables.product.prodname_ghe_server %}](/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)”。{% ifversion ghes %}
4. 审查您计划启用的功能的先决条件。

View File

@@ -1,6 +1,6 @@
---
title: Enabling automatic user license sync for your enterprise
intro: 'You can manage license usage across your {% data variables.product.prodname_enterprise %} deployments by automatically syncing user licenses from {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}.'
intro: 'You can manage license usage across your {% data variables.product.prodname_enterprise %} environments by automatically syncing user licenses from {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}.'
redirect_from:
- /enterprise/admin/installation/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
- /enterprise/admin/configuration/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
@@ -20,13 +20,22 @@ shortTitle: Automatic user license sync
## 关于许可同步
After you enable license synchronization, you'll be able to view license usage for your entire enterprise across {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}. {% data variables.product.prodname_github_connect %} 每周在 {% data variables.product.prodname_ghe_server %} 与 {% data variables.product.prodname_ghe_cloud %} 之间同步许可。 更多信息请参阅“[管理 {% data variables.product.prodname_enterprise %} 的许可](/billing/managing-your-license-for-github-enterprise)”。
{% data reusables.enterprise-licensing.about-license-sync %} For more information, see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect#data-transmission-for-github-connect)."
If you enable automatic user license sync for your enterprise, {% data variables.product.prodname_github_connect %} will automatically synchronize license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %} weekly.
If you use multiple {% data variables.product.prodname_ghe_server %} instances, you can enable automatic license sync between each of your instances and the same organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}.
{% data reusables.enterprise-licensing.view-consumed-licenses %}
您还可以手动将 {% data variables.product.prodname_ghe_server %} 用户许可信息上传到 {% data variables.product.prodname_ghe_cloud %}。 For more information, see "[Syncing license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)."
{% data reusables.enterprise-licensing.verified-domains-license-sync %}
## 启用许可同步
Before enabling license synchronization on {% data variables.product.product_location %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
{% data reusables.enterprise-accounts.access-enterprise %}{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.github-connect-tab %}
1. 在“Server can sync user license count and usage”下使用下拉菜单然后选择 **Enabled**。 ![用于启用自动用户许可同步的下拉菜单](/assets/images/enterprise/site-admin-settings/enable-user-license-drop-down.png)

View File

@@ -28,7 +28,7 @@ topics:
{% data variables.product.prodname_dependabot %} helps users of {% data variables.product.product_location %} find and fix vulnerabilities in their dependencies.{% ifversion ghes > 3.2 %} You can enable {% data variables.product.prodname_dependabot_alerts %} to notify users about vulnerable dependencies and {% data variables.product.prodname_dependabot_updates %} to fix the vulnerabilities and keep dependencies updated to the latest version.
### About {% data variables.product.prodname_dependabot_alerts %}
### 关于 {% data variables.product.prodname_dependabot_alerts %}
{% endif %}
{% data reusables.dependabot.dependabot-alerts-beta %}
@@ -39,7 +39,7 @@ With {% data variables.product.prodname_dependabot_alerts %}, {% data variables.
After you enable {% data variables.product.prodname_dependabot_alerts %} for your enterprise, vulnerability data is synced from the {% data variables.product.prodname_advisory_database %} to your instance once every hour. Only {% data variables.product.company_short %}-reviewed advisories are synchronized. {% data reusables.security-advisory.link-browsing-advisory-db %}
You can also choose to manually sync vulnerability data at any time. For more information, see "[Viewing the vulnerability data for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/viewing-the-vulnerability-data-for-your-enterprise)."
您还可以随时选择手动同步漏洞数据。 For more information, see "[Viewing the vulnerability data for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/viewing-the-vulnerability-data-for-your-enterprise)."
{% note %}
@@ -52,7 +52,7 @@ When {% data variables.product.product_location %} receives information about a
For repositories with {% data variables.product.prodname_dependabot_alerts %} enabled, scanning is triggered on any push to the default branch that contains a manifest file or lock file. Additionally, when a new vulnerability record is added to {% data variables.product.product_location %}, {% data variables.product.product_name %} scans all existing repositories on {% data variables.product.product_location %} and generates alerts for any repository that is vulnerable. 更多信息请参阅“[关于易受攻击的依赖项的警报](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)”。
{% ifversion ghes > 3.2 %}
### About {% data variables.product.prodname_dependabot_updates %}
### 关于 {% data variables.product.prodname_dependabot_updates %}
{% data reusables.dependabot.beta-security-and-version-updates %}
@@ -66,18 +66,17 @@ After you enable {% data variables.product.prodname_dependabot_alerts %}, you ca
With {% data variables.product.prodname_dependabot_updates %}, {% data variables.product.company_short %} automatically creates pull requests to update dependencies in two ways.
- **{% data variables.product.prodname_dependabot_version_updates %}**: Users add a {% data variables.product.prodname_dependabot %} configuration file to the repository to enable {% data variables.product.prodname_dependabot %} to create pull requests when a new version of a tracked dependency is released. For more information, see "[About {% data variables.product.prodname_dependabot_version_updates %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates)."
- **{% data variables.product.prodname_dependabot_version_updates %}**: Users add a {% data variables.product.prodname_dependabot %} configuration file to the repository to enable {% data variables.product.prodname_dependabot %} to create pull requests when a new version of a tracked dependency is released. 更多信息请参阅“[关于 {% data variables.product.prodname_dependabot_version_updates %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates)“。
- **{% data variables.product.prodname_dependabot_security_updates %}**: Users toggle a repository setting to enable {% data variables.product.prodname_dependabot %} to create pull requests when {% data variables.product.prodname_dotcom %} detects a vulnerability in one of the dependencies of the dependency graph for the repository. For more information, see "[About alerts for vulnerable dependencies](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies)" and "[About {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)."
{% endif %}
## Enabling {% data variables.product.prodname_dependabot_alerts %}
## 启用 {% data variables.product.prodname_dependabot_alerts %}
Before you can enable {% data variables.product.prodname_dependabot_alerts %}:
- You must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."{% ifversion ghes %}
- You must enable the dependency graph. For more information, see "[Enabling the dependency graph for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise)."{% endif %}
- 您必须启用依赖关系图。 For more information, see "[Enabling the dependency graph for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise)."{% endif %}
{% data reusables.enterprise-accounts.access-enterprise %}
{%- ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}
{% data reusables.enterprise-accounts.github-connect-tab %}
{%- if dependabot-updates-github-connect %}
1. Under "{% data variables.product.prodname_dependabot %}", to the right of "Users can receive vulnerability alerts for open source code dependencies", select the dropdown menu and click **Enabled without notifications**. Optionally, to enable alerts with notifications, click **Enabled with notifications**.
@@ -85,16 +84,16 @@ Before you can enable {% data variables.product.prodname_dependabot_alerts %}:
![Screenshot of the dropdown menu to enable scanning repositories for vulnerabilities](/assets/images/enterprise/site-admin-settings/dependabot-alerts-dropdown.png)
{%- else %}
1. Under "Repositories can be scanned for vulnerabilities", select the drop-down menu and click **Enabled without notifications**. Optionally, to enable alerts with notifications, click **Enabled with notifications**. ![Drop-down menu to enable scanning repositories for vulnerabilities](/assets/images/enterprise/site-admin-settings/enable-vulnerability-scanning-in-repositories.png)
1. Under "Repositories can be scanned for vulnerabilities", select the drop-down menu and click **Enabled without notifications**. Optionally, to enable alerts with notifications, click **Enabled with notifications**. ![用于启用扫描仓库有无漏洞的下拉菜单](/assets/images/enterprise/site-admin-settings/enable-vulnerability-scanning-in-repositories.png)
{%- endif %}
{% tip %}
**Tip**: We recommend configuring {% data variables.product.prodname_dependabot_alerts %} without notifications for the first few days to avoid an overload of emails. After a few days, you can enable notifications to receive {% data variables.product.prodname_dependabot_alerts %} as usual.
**Tip**: We recommend configuring {% data variables.product.prodname_dependabot_alerts %} without notifications for the first few days to avoid an overload of emails. 几天后,您可以开启通知,像往常一样接收 {% data variables.product.prodname_dependabot_alerts %}
{% endtip %}
{% if dependabot-updates-github-connect %}
## Enabling {% data variables.product.prodname_dependabot_updates %}
## 启用 {% data variables.product.prodname_dependabot_updates %}
After you enable {% data variables.product.prodname_dependabot_alerts %} for your enterprise, you can enable {% data variables.product.prodname_dependabot_updates %}.

View File

@@ -43,7 +43,7 @@ Before enabling {% data variables.product.prodname_unified_contributions %} on {
{% data reusables.github-connect.access-dotcom-and-enterprise %}
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.business %}
{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
{% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
1. 登录到 {% data variables.product.product_location %} 和 {% data variables.product.prodname_dotcom_the_website %}。
{% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %}
1. 在“Users can share contribution counts to {% data variables.product.prodname_dotcom_the_website %}”下,单击 **Request access**。 ![Request access to unified contributions option](/assets/images/enterprise/site-admin-settings/dotcom-ghe-connection-request-access.png){% ifversion ghes %}

View File

@@ -44,7 +44,7 @@ Before you can enable {% data variables.product.prodname_unified_search %}, you
{% data reusables.github-connect.access-dotcom-and-enterprise %}
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.business %}
{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
{% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
1. Sign into {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
{% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %}
1. 在“Users can search {% data variables.product.prodname_dotcom_the_website %}”下,使用下拉菜单,然后单击 **Enabled**。 ![在搜索 GitHub.com 下拉菜单中启用搜索选项](/assets/images/enterprise/site-admin-settings/github-dotcom-enable-search.png)

View File

@@ -54,7 +54,8 @@ If you're connecting {% data variables.product.product_location %} to an organiz
{% ifversion ghes %}
1. 登录到 {% data variables.product.product_location %} 和 {% data variables.product.prodname_dotcom_the_website %}。
{% data reusables.enterprise-accounts.access-enterprise %}{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
1. 登录到 {% data variables.product.product_location %} 和 {% data variables.product.prodname_dotcom_the_website %}。
{% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %}
1. 在“{% data variables.product.prodname_github_connect %} is not enabled yet”下单击 **Enable {% data variables.product.prodname_github_connect %}**。 By clicking **Enable {% data variables.product.prodname_github_connect %}**, you agree to the "<a href="/github/site-policy/github-terms-for-additional-products-and-features#connect" class="dotcom-only">{% data variables.product.prodname_dotcom %} Terms for Additional Products and Features</a>."
@@ -70,7 +71,8 @@ Enterprise owners can disable {% data variables.product.prodname_github_connect
与 {% data variables.product.prodname_ghe_cloud %} 断开连接后,{% data variables.product.prodname_github_connect %} {% data variables.product.prodname_github_app %} 会从企业帐户或组织中删除,{% data variables.product.product_location %} 上存储的凭据也会删除。
{% data reusables.enterprise-accounts.access-enterprise %}{% ifversion ghes < 3.1 %}{% data reusables.enterprise-accounts.settings-tab %}{% endif %}{% data reusables.enterprise-accounts.github-connect-tab %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.github-connect-tab %}
1. 在要断开连接的企业帐户或组织旁,单击 **Disable {% data variables.product.prodname_github_connect %}**
{% ifversion ghes %}
![企业帐户或组织名称旁的 Disable GitHub Connect 按钮](/assets/images/enterprise/business-accounts/disable-github-connect-button.png)

View File

@@ -11,7 +11,7 @@ topics:
redirect_from:
- /admin/configuration/configuring-your-enterprise/managing-github-for-mobile-for-your-enterprise
- /admin/configuration/managing-github-for-mobile-for-your-enterprise
shortTitle: 'Manage GitHub Mobile'
shortTitle: Manage GitHub Mobile
---
{% ifversion ghes %}
{% data reusables.mobile.ghes-release-phase %}

View File

@@ -22,7 +22,7 @@ topics:
## About {% data variables.product.prodname_actions %} for enterprises
With {% data variables.product.prodname_actions %}, you can improve developer productivity by automating every phase of your enterprise's software development workflow.
{% data reusables.actions.about-actions-for-enterprises %}
| Task | More information |
| ---- | ---------------- |
@@ -60,4 +60,4 @@ After you finish planning, you can follow the instructions for getting started w
## Further reading
- "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions)"{% ifversion ghec %}
- "[About billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)"{% endif %}
- "[About billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)"{% endif %}

View File

@@ -2,7 +2,7 @@
title: Getting started with GitHub Actions for GitHub AE
shortTitle: Get started
intro: 'Learn about configuring {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_managed %}.'
permissions: 'Site administrators can enable {% data variables.product.prodname_actions %} and configure enterprise settings.'
permissions: 'Enterprise owners can enable {% data variables.product.prodname_actions %} and configure enterprise settings.'
versions:
ghae: '*'
type: how_to
@@ -17,9 +17,7 @@ redirect_from:
## About {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_managed %}
This article explains how site administrators can configure {% data variables.product.prodname_ghe_managed %} to use {% data variables.product.prodname_actions %}.
{% data variables.product.prodname_actions %} is enabled for {% data variables.product.prodname_ghe_managed %} by default. To get started using {% data variables.product.prodname_actions %} within your enterprise, you need to manage access permissions for {% data variables.product.prodname_actions %} and add runners to run workflows.
{% data variables.product.prodname_actions %} is enabled for {% data variables.product.product_name %} by default. To get started using {% data variables.product.prodname_actions %} within your enterprise, you need to manage access permissions for {% data variables.product.prodname_actions %} and add runners to run workflows.
{% data reusables.actions.introducing-enterprise %}
@@ -31,6 +29,6 @@ You can use policies to manage access to {% data variables.product.prodname_acti
## Adding runners
You can configure and host servers to run jobs for your enterprise on {% data variables.product.product_name %}. {% data reusables.actions.about-self-hosted-runners %} For more information, see "[Hosting your own runners](/actions/hosting-your-own-runners)."
You must configure and host your own machines to run jobs for your enterprise on {% data variables.product.product_name %}. {% data reusables.actions.about-self-hosted-runners %} For more information, see "[Getting started with self-hosted runners for your enterprise](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-self-hosted-runners-for-your-enterprise)" and "[Hosting your own runners](/actions/hosting-your-own-runners)."
{% data reusables.actions.general-security-hardening %}

View File

@@ -29,6 +29,6 @@ To run {% data variables.product.prodname_actions %} workflows, you need to use
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)."
If you choose self-hosted runners, you can add runners at the enterprise, organization, or repository levels. For more information, see "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)"
If you choose self-hosted runners, you can add runners at the enterprise, organization, or repository levels. For more information, see "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)."
{% data reusables.actions.general-security-hardening %}
{% data reusables.actions.general-security-hardening %}

View File

@@ -33,15 +33,6 @@ This article explains how site administrators can configure {% data variables.pr
## Review hardware requirements
{% ifversion ghes = 3.0 %}
{% note %}
**Note**: If you're upgrading an existing {% data variables.product.prodname_ghe_server %} instance to 3.0 or later and want to configure {% data variables.product.prodname_actions %}, note that the minimum hardware requirements have increased. For more information, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/upgrading-github-enterprise-server#about-minimum-requirements-for-github-enterprise-server-30-and-later)."
{% endnote %}
{% endif %}
{%- ifversion ghes < 3.2 %}
@@ -157,6 +148,6 @@ For more information, see "[About using actions in your enterprise](/admin/githu
{% endif %}
## Reserved Names
## Reserved names
When you enable {% data variables.product.prodname_actions %} for your enterprise, two organizations are created: `github` and `actions`. If your enterprise already uses the `github` organization name, `github-org` (or `github-github-org` if `github-org` is also in use) will be used instead. If your enterprise already uses the `actions` organization name, `github-actions` (or `github-actions-org` if `github-actions` is also in use) will be used instead. Once actions is enabled, you won't be able to use these names anymore.

View File

@@ -0,0 +1,150 @@
---
title: Getting started with self-hosted runners for your enterprise
shortTitle: 自托管运行器
intro: 'You can configure a runner machine for your enterprise so your developers can start automating workflows with {% data variables.product.prodname_actions %}.'
versions:
ghec: '*'
ghes: '*'
ghae: '*'
permissions: 'Enterprise owners can configure policies for {% data variables.product.prodname_actions %} and add self-hosted runners to the enterprise.'
type: quick_start
topics:
- Actions
- Enterprise
- Fundamentals
---
## About self-hosted runners for {% data variables.product.prodname_actions %}
{% data reusables.actions.about-actions-for-enterprises %} For more information, see "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)."
With {% data variables.product.prodname_actions %}, developers can write and combine individual tasks called actions to create custom workflows. {% ifversion ghes or ghae %}To enable {% data variables.product.prodname_actions %} for {% ifversion ghae %}your enterprise{% elsif ghes %} {% data variables.product.product_location %}{% endif %}, you must host at least one machine to execute jobs.{% endif %} {% ifversion ghec %}You can host your own runner machine to execute jobs, and this{% elsif ghes or ghae %}This{% endif %} machine is called a self-hosted runner. {% data reusables.actions.self-hosted-runner-locations %} {% data reusables.actions.self-hosted-runner-architecture %} {% ifversion ghec %}All{% elsif ghes or ghae %}Self-hosted{% endif %} runners can run Linux, Windows, or macOS. 更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners)”。
{% ifversion ghec %}
Alternatively, you can use runner machines that {% data variables.product.company_short %} hosts. {% data variables.product.company_short %}-hosted runners are outside the scope of this guide. 更多信息请参阅“[关于 {% data variables.product.company_short %} 托管的运行器](/actions/using-github-hosted-runners/about-github-hosted-runners)”。
{% endif %}
This guide shows you how to apply a centralized management approach to self-hosted runners for {% data variables.product.prodname_actions %} in your enterprise. In the guide, you'll complete the following tasks.
1. Configure a limited policy to restrict the actions that can run within your enterprise
1. Deploy a self-hosted runner for your enterprise
1. Create a group to manage access to the runners available to your enterprise
1. Optionally, further restrict the repositories that can use the runner
{%- ifversion ghec or ghae-issue-4462 or ghes > 3.2 %}
1. Optionally, build custom tooling to automatically scale your self-hosted runners
{% endif %}
You'll also find additional information about how to monitor and secure your self-hosted runners,{% ifversion ghes or ghae %} how to access actions from {% data variables.product.prodname_dotcom_the_website %},{% endif %} and how to customize the software on your runner machines.
After you finish the guide, {% ifversion ghec or ghae %}members of your enterprise{% elsif ghes %}users of {% data variables.product.product_location %}{% endif %} will be able to run workflow jobs from {% data variables.product.prodname_actions %} on a self-hosted runner machine.
## 基本要求
{% data reusables.actions.self-hosted-runners-prerequisites %}
- Your enterprise must own at least one organization. For more information, see "[About organizations](/organizations/collaborating-with-groups-in-organizations/about-organizations)" and "[Creating a new organization from scratch](/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch)."
## 1. Configure policies for {% data variables.product.prodname_actions %}
First, enable {% data variables.product.prodname_actions %} for all organizations, and configure a policy to restrict the actions that can run {% ifversion ghec or ghae%}within your enterprise on {% data variables.product.product_name %}{% elsif ghes %}on {% data variables.product.product_location %}{% endif %}. Optionally, organization owners can further restrict these policies for each organization.
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.actions-tab %}
1. Under "Policies", select **Enable for all organizations**.
![Screenshot of "Enable for all organizations" policy for {% data variables.product.prodname_actions %}](/assets/images/help/settings/actions-policy-enable-for-all-organizations.png)
1. Select **Allow select actions** and **Allow actions created by GitHub** to allow local actions and actions created by {% data variables.product.company_short %}.
![Screenshot of "Allow select actions" and "Allow actions created by {% data variables.product.company_short %}" for {% data variables.product.prodname_actions %}](/assets/images/help/settings/actions-policy-allow-select-actions-and-actions-from-github.png)
1. 单击 **Save保存**
You can configure additional policies to restrict the actions available to {% ifversion ghec or ghae %}enterprise members{% elsif ghes %}users of {% data variables.product.product_location %}{% endif %}. 更多信息请参阅“[在企业中执行 {% data variables.product.prodname_actions %} 的策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#allowing-select-actions-to-run)”。
## 2. Deploy the self-hosted runner for your enterprise
Next, add a self-hosted runner to your enterprise. {% data variables.product.product_name %} will guide you through installation of the necessary software on the runner machine. After you deploy the runner, you can verify connectivity between the runner machine and {%ifversion ghec or ghae %}your enterprise{% elsif ghes %}{% data variables.product.product_location %}{% endif %}.
### Adding the self-hosted runner
{% data reusables.actions.self-hosted-runner-add-to-enterprise %}
{% data reusables.actions.self-hosted-runner-check-installation-success %}
## 3. Manage access to the self-hosted runner using a group
You can create a runner group to manage access to the runner that you added to your enterprise. You'll use the group to choose which organizations can execute jobs from {% data variables.product.prodname_actions %} on the runner.
{% data variables.product.product_name %} adds all new runners to a group. Runners can be in one group at a time. By default, {% data variables.product.product_name %} adds new runners to the "Default" group.
{% data reusables.actions.self-hosted-runner-groups-add-to-enterprise-first-steps %}
1. To choose a policy for organization access, under "Organization access", select the **Organization access** drop-down, and click **Selected organizations**.
1. To the right of the drop-down with the organization access policy, click {% octicon "gear" aria-label="The Gear icon" %}.
1. Select the organizations you'd like to grant access to the runner group.
{%- ifversion ghec or ghes %}
1. Optionally, to allow public repositories in the selected organizations to use runners in the group, select **Allow public repositories**.
{% warning %}
**Warning**:
{% indented_data_reference reusables.actions.self-hosted-runner-security spaces=3 %}
更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。
{% endwarning %}
{%- endif %}
{% data reusables.actions.self-hosted-runner-create-group %}
{%- ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}
1. Click the "Runners" tab.
1. In the list of runners, click the runner that you deployed in the previous section.
1. 单击 **Edit编辑**
1. Click **Runner groups {% octicon "gear" aria-label="The Gear icon" %}**.
1. In the list of runner groups, click the name of the group that you previously created.
1. Click **Save** to move the runner to the group.
{%- elsif ghes < 3.4 or ghae %}
1. To the right of "Default", click the number of runners in the group to show the runners.
1. Select the runner that you deployed.
1. To the right of "Runner groups", select the **Move to group** dropdown, and click the group that you previously created.
{%- endif %}
You've now deployed a self-hosted runner that can run jobs from {% data variables.product.prodname_actions %} within the organizations that you specified.
## 4. Further restrict access to the self-hosted runner
Optionally, organization owners can further restrict the access policy of the runner group that you created. For example, an organization owner could allow only certain repositories in the organization to use the runner group.
更多信息请参阅“[使用组管理对自托管运行器的访问](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)”。
{% ifversion ghec or ghae-issue-4462 or ghes > 3.2 %}
## 5. Automatically scale your self-hosted runners
Optionally, you can build custom tooling to automatically scale the self-hosted runners for {% ifversion ghec or ghae %}your enterprise{% elsif ghes %}{% data variables.product.product_location %}{% endif %}. For example, your tooling can respond to webhook events from {% data variables.product.product_location %} to automatically scale a cluster of runner machines. 更多信息请参阅“[使用自托管运行器自动缩放](/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners)”。
{% endif %}
## 后续步骤
- You can monitor self-hosted runners and troubleshoot common issues. 更多信息请参阅“[自托管运行器监控和故障排除](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners)”。
- {% data variables.product.company_short %} recommends that you review security considerations for self-hosted runner machines. For more information, see "[Security hardening for {% data variables.product.prodname_actions %}](/actions/security-guides/security-hardening-for-github-actions#hardening-for-self-hosted-runners)."
- {% ifversion ghec %}If you use {% data variables.product.prodname_ghe_server %} or {% data variables.product.prodname_ghe_managed %}, you{% elsif ghes or ghae %}You{% endif %} can manually sync repositories on {% data variables.product.prodname_dotcom_the_website %} containing actions to your enterprise on {% ifversion ghes or ghae %}{% data variables.product.product_name %}{% elsif ghec %}{% data variables.product.prodname_ghe_server %} or {% data variables.product.prodname_ghe_managed %}{% endif %}. Alternatively, you can allow members of your enterprise to automatically access actions from {% data variables.product.prodname_dotcom_the_website %} by using {% data variables.product.prodname_github_connect %}. 更多信息请参阅以下文章。
{%- ifversion ghes or ghae %}
- "[Manually syncing actions from {% data variables.product.prodname_dotcom_the_website %}](/admin/github-actions/managing-access-to-actions-from-githubcom/manually-syncing-actions-from-githubcom)"
- "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)"
{%- elsif ghec %}
- "Manually syncing actions from {% data variables.product.prodname_dotcom_the_website %}" in the [{% data variables.product.prodname_ghe_server %}](/enterprise-server@latest//admin/github-actions/managing-access-to-actions-from-githubcom/manually-syncing-actions-from-githubcom) or [{% data variables.product.prodname_ghe_managed %}](/github-ae@latest//admin/github-actions/managing-access-to-actions-from-githubcom/manually-syncing-actions-from-githubcom) documentation
- "Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}" in the [{% data variables.product.prodname_ghe_server %}](/enterprise-server@latest//admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect) or [{% data variables.product.prodname_ghe_managed %}](/github-ae@latest//admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect) documentation
{%- endif %}
- You can customize the software available on your self-hosted runner machines, or configure your runners to run software similar to {% data variables.product.company_short %}-hosted runners{% ifversion ghes or ghae %} available for customers using {% data variables.product.prodname_dotcom_the_website %}{% endif %}. The software that powers runner machines for {% data variables.product.prodname_actions %} is open source. For more information, see the [`actions/runner`](https://github.com/actions/runner) and [`actions/virtual-environments`](https://github.com/actions/virtual-environments) repositories.
## 延伸阅读
- "[Configuring the self-hosted runner application as a service](/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service)"
- "[Using self-hosted runners in a workflow](/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow)"

View File

@@ -15,6 +15,7 @@ children:
- /getting-started-with-github-actions-for-github-enterprise-cloud
- /getting-started-with-github-actions-for-github-enterprise-server
- /getting-started-with-github-actions-for-github-ae
- /getting-started-with-self-hosted-runners-for-your-enterprise
shortTitle: 入门
---

View File

@@ -56,9 +56,7 @@ You should plan where you'll store your secrets. We recommend storing secrets in
In {% data variables.product.prodname_dotcom %}, you can store secrets at the repository or organization level. Secrets at the repository level can be limited to workflows in certain environments, such as production or testing. For more information, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
![Screenshot of a list of secrets](/assets/images/help/settings/actions-org-secrets-list.png)
{% ifversion fpt or ghes > 3.0 or ghec or ghae %}
You should consider adding manual approval protection for sensitive environments, so that workflows must be approved before getting access to the environments' secrets. For more information, see "[Using environments for deployments](/actions/deployment/targeting-different-environments/using-environments-for-deployment)."{% endif %}
![Screenshot of a list of secrets](/assets/images/help/settings/actions-org-secrets-list.png) You should consider adding manual approval protection for sensitive environments, so that workflows must be approved before getting access to the environments' secrets. For more information, see "[Using environments for deployments](/actions/deployment/targeting-different-environments/using-environments-for-deployment)."
### Security considerations for third-party actions

View File

@@ -1,7 +1,7 @@
---
title: Enabling automatic access to GitHub.com actions using GitHub Connect
intro: 'To allow {% data variables.product.prodname_actions %} in your enterprise to use actions from {% data variables.product.prodname_dotcom_the_website %}, you can connect your enterprise instance to {% data variables.product.prodname_ghe_cloud %}.'
permissions: 'Site administrators for {% data variables.product.product_name %} who are also owners of the connected {% data variables.product.prodname_ghe_cloud %} organization or enterprise account can enable access to all {% data variables.product.prodname_dotcom_the_website %} actions.'
permissions: 'Enterprise owners can enable access to all {% data variables.product.prodname_dotcom_the_website %} actions.'
redirect_from:
- /enterprise/admin/github-actions/enabling-automatic-access-to-githubcom-actions-using-github-connect
- /admin/github-actions/enabling-automatic-access-to-githubcom-actions-using-github-connect
@@ -36,17 +36,9 @@ Before enabling access to all actions from {% data variables.product.prodname_do
{% data reusables.actions.enterprise-github-connect-warning %}
{% data reusables.enterprise-accounts.access-enterprise %}
{%- ifversion ghes < 3.1 %}
{% data reusables.enterprise-accounts.settings-tab %}
{%- endif %}
{% data reusables.enterprise-accounts.github-connect-tab %}
{%- ifversion ghes > 3.0 or ghae %}
1. Under "Users can utilize actions from GitHub.com in workflow runs", use the drop-down menu and select **Enabled**.
![Drop-down menu to actions from GitHub.com in workflows runs](/assets/images/enterprise/site-admin-settings/enable-marketplace-actions-drop-down-ae.png)
{%- else %}
1. Under "Server can use actions from GitHub.com in workflows runs", use the drop-down menu and select **Enabled**.
![Drop-down menu to actions from GitHub.com in workflows runs](/assets/images/enterprise/site-admin-settings/enable-marketplace-actions-drop-down.png)
{%- endif %}
1. {% data reusables.actions.enterprise-limit-actions-use %}
{% ifversion ghes > 3.2 or ghae-issue-4815 %}

View File

@@ -72,7 +72,7 @@ You can populate the runner tool cache by running a {% data variables.product.pr
cd "${{ runner.tool_cache }}"
tar -czf tool_cache.tar.gz *
- name: Upload tool cache artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: ${{runner.tool_cache}}/tool_cache.tar.gz
```

View File

@@ -13,7 +13,8 @@ learningTracks:
- '{% ifversion ghae %}get_started_with_github_ae{% endif %}'
- '{% ifversion ghes %}deploy_an_instance{% endif %}'
- '{% ifversion ghes %}upgrade_your_instance{% endif %}'
- adopting_github_actions_for_your_enterprise
- adopting_github_actions_for_your_enterprise_ghec
- adopting_github_actions_for_your_enterprise_ghes_and_ghae
- '{% ifversion ghes %}increase_fault_tolerance{% endif %}'
- '{% ifversion ghes %}improve_security_of_your_instance{% endif %}'
- '{% ifversion ghes > 2.22 %}configure_github_actions{% endif %}'

View File

@@ -69,7 +69,6 @@ changelog:
label: enterprise
featuredLinks:
guides:
- '{% ifversion ghae %}/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise{% endif %}'
- '{% ifversion ghae %}/admin/user-management/auditing-users-across-your-enterprise{% endif %}'
- '{% ifversion ghae %}/admin/configuration/restricting-network-traffic-to-your-enterprise{% endif %}'
- '{% ifversion ghes %}/admin/configuration/configuring-backups-on-your-appliance{% endif %}'
@@ -79,6 +78,7 @@ featuredLinks:
- '{% ifversion ghec %}/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users{% endif %}'
- '{% ifversion ghec %}/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-identity-and-access-management-for-your-enterprise{% endif %}'
- '{% ifversion ghec %}/admin/user-management/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise{% endif %}'
- /admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-self-hosted-runners-for-your-enterprise
guideCards:
- '{% ifversion ghes > 2.22 %} /admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server {% elsif ghes < 3.0 %} /admin/enterprise-management/upgrading-github-enterprise-server {% endif %}'
- '{% ifversion ghes > 2.22 %} /admin/packages/getting-started-with-github-packages-for-your-enterprise {% elsif ghes < 3.0 %} /admin/user-management/customizing-user-messages-for-your-enterprise {% endif %}'
@@ -94,6 +94,7 @@ featuredLinks:
- '{% ifversion ghes %}/github/getting-started-with-github/setting-up-a-trial-of-github-enterprise-server{% endif %}'
- '{% ifversion ghes %}/admin/installation{% endif %}'
- '{% ifversion ghae %}/admin/identity-and-access-management/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad{% endif %}'
- '{% ifversion ghae %}/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise{% endif %}'
- '{% ifversion ghae %}/admin/overview/about-upgrades-to-new-releases{% endif %}'
- '{% ifversion ghae %}/get-started/signing-up-for-github/setting-up-a-trial-of-github-ae{% endif %}'
- '{% ifversion ghes %}/billing/managing-your-license-for-github-enterprise{% endif %}'
@@ -105,11 +106,11 @@ featuredLinks:
- /admin/configuration/configuring-github-connect/managing-github-connect
- /admin/enterprise-support/about-github-enterprise-support
videos:
- title: "GitHub in the Enterprise Maya Ross"
- title: GitHub in the Enterprise Maya Ross
href: 'https://www.youtube-nocookie.com/embed/1-i39RqaxRs'
- title: "What's new for GitHub Enterprise Jarryd McCree"
- title: What's new for GitHub Enterprise Jarryd McCree
href: 'https://www.youtube-nocookie.com/embed/ZZviWZgrqhM'
- title: "Enforcing information security policy through GitHub Enterprise Thomas Worley"
- title: Enforcing information security policy through GitHub Enterprise Thomas Worley
href: 'https://www.youtube-nocookie.com/embed/DCu-ZTT7WTI'
videosHeading: GitHub Universe 2021 videos
layout: product-landing
@@ -132,3 +133,4 @@ children:
- /release-notes
- /all-releases
---

View File

@@ -19,7 +19,6 @@ shortTitle: 配置包生态系统
要防止上传新包,可以将以前启用的生态系统设置为**只读**,同时仍允许下载现有包。
{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %}
{% data reusables.enterprise_site_admin_settings.packages-tab %}
@@ -29,7 +28,7 @@ shortTitle: 配置包生态系统
![Ecosystem toggles](/assets/images/enterprise/3.1/site-admin-settings/ecosystem-toggles.png){% endif %}
{% data reusables.enterprise_management_console.save-settings %}
{% ifversion ghes = 3.0 or ghes > 3.0 %}
{% ifversion ghes %}
## 连接到官方 npm 注册表
如果您已在企业中启用了 npm 包,并希望允许访问官方 npm 注册表以及 {% data variables.product.prodname_registry %} npm 注册表,则必须执行一些附加配置。

View File

@@ -5,7 +5,7 @@ permissions: 'Enterprise owners can enforce policies for {% data variables.produ
product: '{% data reusables.gated-features.ghas %}'
versions:
ghec: '*'
ghes: '>=3.1'
ghes: '*'
ghae: '*'
type: how_to
topics:

View File

@@ -53,7 +53,7 @@ shortTitle: GitHub Actions policies
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.actions-tab %}
1. 在 **Policies策略**下,选择 **Allow select actions允许选择操作**并将所需操作添加到列表中。
{%- ifversion ghes > 3.0 or ghae-issue-5094 %}
{%- ifversion ghes or ghae-issue-5094 %}
![添加操作到允许列表](/assets/images/help/organizations/enterprise-actions-policy-allow-list.png)
{%- elsif ghae %}
![添加操作到允许列表](/assets/images/enterprise/github-ae/enterprise-actions-policy-allow-list.png)

View File

@@ -90,7 +90,7 @@ The `$GITHUB_VIA` variable is available in the pre-receive hook environment when
| <pre>git refs delete api</pre> | Deletion of a ref via the API | "[Git database](/rest/reference/git#delete-a-reference)" in the REST API documentation |
| <pre>git refs update api</pre> | Update of a ref via the API | "[Git database](/rest/reference/git#update-a-reference)" in the REST API documentation |
| <pre>git repo contents api</pre> | Change to a file's contents via the API | "[Create or update file contents](/rest/reference/repos#create-or-update-file-contents)" in the REST API documentation |
{%- ifversion ghes > 3.0 %}
{%- ifversion ghes %}
| `merge ` | Merge of a pull request using auto-merge | "[Automatically merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)" |
{%- endif %}
| <pre>merge base into head</pre> | Update of the topic branch from the base branch when the base branch requires strict status checks (via **Update branch** in a pull request, for example) | "[About protected branches](/github/administering-a-repository/about-protected-branches#require-status-checks-before-merging)" |

View File

@@ -64,4 +64,4 @@ You must be a site admin and an organization owner to create a team with LDAP sy
{% data reusables.organizations.create-team-choose-parent %}
{% data reusables.organizations.create_team %}
{% endif %}
{% endif %}

View File

@@ -51,7 +51,7 @@ topics:
## 企业配置设置
| 操作 | 描述 |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |{% ifversion ghes > 3.0 or ghae %}
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |{% ifversion ghes or ghae %}
| `business.advanced_security_policy_update` | 站点管理员创建、更新或删除 {% data variables.product.prodname_GH_advanced_security %} 策略。 更多信息请参阅“[在企业中执行 {% data variables.product.prodname_advanced_security %} 的策略](/admin/policies/enforcing-policies-for-advanced-security-in-your-enterprise)”。{% endif %}
| `business.clear_members_can_create_repos` | 站点管理员取消了对在企业中的组织中创建仓库的限制。 更多信息请参阅“[在企业中实施仓库管理策略](/admin/policies/enforcing-repository-management-policies-in-your-enterprise#setting-a-policy-for-repository-creation)”。{% ifversion ghes > 3.1 %}
| `business.referrer_override_enable` | 站点管理员可以改写推荐策略。 更多信息请参阅“[配置企业的推荐策略](/admin/configuration/configuring-your-enterprise/configuring-the-referrer-policy-for-your-enterprise)”。 |

View File

@@ -1,7 +1,7 @@
---
title: GitHub 上的帐单和付款
shortTitle: 计费和付款
intro: '{% ifversion fpt %}{% data variables.product.product_name %} 为每个帐户提供免费和付费产品。 您可以随时升级或降级帐户的订阅和管理结算设置。{% elsif ghec or ghes or ghae %}{% data variables.product.company_short %} 对企业成员{% ifversion ghec or ghae %}使用 {% data variables.product.product_name %}{% elsif ghes %} {% data variables.product.product_name %}的许可席位{% ifversion ghes > 3.0 %} 以及您购买的任何其他服务{% endif %}{% endif %}计费。 {% endif %}{% ifversion ghec %} 您可以随时查看订阅和管理结算设置。 {% endif %}{% ifversion fpt or ghec %} 您还可以查看使用情况和管理 {% data variables.product.product_name %} 功能(如 {% data variables.product.prodname_actions %}、{% data variables.product.prodname_registry %} 和 {% data variables.product.prodname_codespaces %})的支出限制。{% endif %}'
intro: '{% ifversion fpt %}{% data variables.product.product_name %} 为每个帐户提供免费和付费产品。 您可以随时升级或降级帐户的订阅和管理结算设置。{% elsif ghec or ghes or ghae %}{% data variables.product.company_short %} 对企业成员{% ifversion ghec or ghae %}使用 {% data variables.product.product_name %}{% elsif ghes %} {% data variables.product.product_name %}的许可席位{% ifversion ghes %} 以及您购买的任何其他服务{% endif %}{% endif %}计费。 {% endif %}{% ifversion ghec %} 您可以随时查看订阅和管理结算设置。 {% endif %}{% ifversion fpt or ghec %} 您还可以查看使用情况和管理 {% data variables.product.product_name %} 功能(如 {% data variables.product.prodname_actions %}、{% data variables.product.prodname_registry %} 和 {% data variables.product.prodname_codespaces %})的支出限制。{% endif %}'
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github
- /categories/setting-up-and-managing-billing-and-payments-on-github

View File

@@ -9,7 +9,7 @@ redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-licensing-for-github-advanced-security/about-licensing-for-github-advanced-security
versions:
fpt: '*'
ghes: '>=3.1'
ghes: '*'
ghec: '*'
type: overview
topics:

View File

@@ -8,7 +8,7 @@ redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/managing-licensing-for-github-advanced-security
versions:
fpt: '*'
ghes: '>=3.1'
ghes: '*'
ghec: '*'
children:
- /about-billing-for-github-advanced-security

View File

@@ -10,10 +10,10 @@ redirect_from:
- /github/setting-up-and-managing-your-enterprise/managing-use-of-advanced-security-for-organizations-in-your-enterprise-account
- /github/setting-up-and-managing-billing-and-payments-on-github/viewing-your-github-advanced-security-usage
versions:
ghes: '>=3.1'
ghes: '*'
fpt: '*'
ghec: '*'
ghae: 'issue-5378'
ghae: issue-5378
miniTocMaxHeadingLevel: 3
type: how_to
topics:

View File

@@ -1,6 +1,6 @@
---
title: About billing for your enterprise
intro: You can view billing information for your enterprise{% ifversion ghec or ghes %} account on {% data variables.product.prodname_dotcom_the_website %}{% endif %}.
intro: 'You can view billing information for your enterprise{% ifversion ghec or ghes %} account on {% data variables.product.prodname_dotcom_the_website %}{% endif %}.'
redirect_from:
- /admin/overview/managing-billing-for-your-enterprise
- /enterprise/admin/installation/managing-billing-for-github-enterprise

View File

@@ -32,3 +32,4 @@ children:
- /one-time-payments-for-customers-in-india
- /discounted-subscriptions-for-github-accounts
---

View File

@@ -48,4 +48,4 @@ You can also see pending {% data variables.product.prodname_enterprise %} invita
## Further reading
- [{% data variables.product.prodname_vs %} subscriptions with {% data variables.product.prodname_enterprise %}](https://docs.microsoft.com/visualstudio/subscriptions/access-github) in Microsoft Docs
- [Use {% data variables.product.prodname_vs %} or {% data variables.product.prodname_vscode %} to deploy apps from {% data variables.product.prodname_dotcom %}](https://docs.microsoft.com/en-us/azure/developer/github/deploy-with-visual-studio) in Microsoft Docs
- [Use {% data variables.product.prodname_vs %} or {% data variables.product.prodname_vscode %} to deploy apps from {% data variables.product.prodname_dotcom %}](https://docs.microsoft.com/en-us/azure/developer/github/deploy-with-visual-studio) in Microsoft Docs

View File

@@ -16,13 +16,17 @@ shortTitle: Sync license usage
{% data reusables.enterprise-licensing.about-license-sync %}
If you allow {% data variables.product.product_location_enterprise %} to connect to your enterprise account on {% data variables.product.prodname_dotcom_the_website %}, you can sync license usage between the environments automatically. Automatic synchronization ensures that you see up-to-date license details on {% data variables.product.prodname_dotcom_the_website %}. If you don't want to allow {% data variables.product.product_location %} to connect to {% data variables.product.prodname_dotcom_the_website %}, you can manually sync license usage by uploading a file from {% data variables.product.product_location %} to {% data variables.product.prodname_dotcom_the_website %}.
To ensure that you see up-to-date license details on {% data variables.product.prodname_dotcom_the_website %}, you can sync license usage between the environments automatically, using {% data variables.product.prodname_github_connect %}. For more information about {% data variables.product.prodname_github_connect %}, see "[About {% data variables.product.prodname_github_connect %}]({% ifversion ghec %}/enterprise-server@latest{% endif %}/admin/configuration/configuring-github-connect/about-github-connect){% ifversion ghec %}" in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}."{% endif %}
For more information about licenses and usage for {% data variables.product.prodname_ghe_server %}, see "[About licenses for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise)."
If you don't want to enable {% data variables.product.prodname_github_connect %}, you can manually sync license usage by uploading a file from {% data variables.product.prodname_ghe_server %} to {% data variables.product.prodname_dotcom_the_website %}.
{% data reusables.enterprise-licensing.view-consumed-licenses %}
{% data reusables.enterprise-licensing.verified-domains-license-sync %}
## Automatically syncing license usage
You can use {% data variables.product.prodname_github_connect %} to automatically sync user license count and usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Enabling automatic user license sync for your enterprise]({% ifversion ghec %}/enterprise-server@latest{% endif %}/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise){% ifversion ghec %}" in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}."{% endif %}
You can use {% data variables.product.prodname_github_connect %} to automatically synchronize user license count and usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Enabling automatic user license sync for your enterprise]({% ifversion ghec %}/enterprise-server@latest{% endif %}/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise){% ifversion ghec %}" in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}."{% endif %}
## Manually syncing license usage

View File

@@ -48,7 +48,7 @@ You can view the license usage for your enterprise and download a file with lice
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.license-tab %}
1. Review your current {% data variables.product.prodname_enterprise %} license, as well as consumed and available user licenses.{% ifversion ghes > 3.0 %}
1. Review your current {% data variables.product.prodname_enterprise %} license, as well as consumed and available user licenses.{% ifversion ghes %}
- If your license includes {% data variables.product.prodname_GH_advanced_security %}, you can review your total seat use as well as a per-organization breakdown of committers. For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} for your enterprise](/admin/advanced-security)."{% endif %}
{% endif %}

View File

@@ -27,7 +27,7 @@ topics:
There are two main ways to use {% data variables.product.prodname_codeql %} analysis for {% data variables.product.prodname_code_scanning %}:
- Add the {% data variables.product.prodname_codeql %} workflow to your repository. This uses the [github/codeql-action](https://github.com/github/codeql-action/) to run the {% data variables.product.prodname_codeql_cli %}. For more information, see "[Setting up {% data variables.product.prodname_code_scanning %} for a repository](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository#setting-up-code-scanning-using-actions)."
- Run the {% data variables.product.prodname_codeql %} {% ifversion fpt or ghes > 3.1 or ghae or ghec %}CLI directly {% elsif ghes = 3.0 %}CLI or runner {% else %}runner {% endif %} in an external CI system and upload the results to {% data variables.product.prodname_dotcom %}. For more information, see "[About {% data variables.product.prodname_codeql %} code scanning in your CI system ](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/about-codeql-code-scanning-in-your-ci-system)."
- Run the {% data variables.product.prodname_codeql %} CLI directly in an external CI system and upload the results to {% data variables.product.prodname_dotcom %}. For more information, see "[About {% data variables.product.prodname_codeql %} code scanning in your CI system ](/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/about-codeql-code-scanning-in-your-ci-system)."
## About {% data variables.product.prodname_codeql %}

Some files were not shown because too many files have changed in this diff Show More