1
0
mirror of synced 2026-01-04 09:06:46 -05:00

New translation batch for cn (#32360)

This commit is contained in:
docubot
2022-11-04 10:55:51 -07:00
committed by GitHub
parent 7d0f9a3c36
commit 30d8a4b869
25 changed files with 446 additions and 246 deletions

View File

@@ -340,6 +340,7 @@ translations/zh-CN/data/release-notes/enterprise-server/3-2/6.yml,file deleted b
translations/zh-CN/data/release-notes/enterprise-server/3-2/7.yml,file deleted because it no longer exists in main
translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml,file deleted because it no longer exists in main
translations/zh-CN/data/release-notes/enterprise-server/3-2/9.yml,file deleted because it no longer exists in main
translations/zh-CN/data/reusables/actions/enterprise-s3-support-warning.md,file deleted because it no longer exists in main
translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md,file deleted because it no longer exists in main
translations/zh-CN/data/reusables/actions/link-to-example-library.md,file deleted because it no longer exists in main
translations/zh-CN/data/reusables/actions/perform-blob-storage-precheck.md,file deleted because it no longer exists in main
@@ -625,11 +626,9 @@ translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise.md,broken liquid tags
translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/about-pre-receive-hooks.md,broken liquid tags
translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md,broken liquid tags
translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise.md,broken liquid tags
translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md,rendering error
translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md,broken liquid tags
translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md,rendering error
translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/index.md,broken liquid tags
translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md,rendering error
translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/restoring-a-deleted-organization.md,broken liquid tags
translations/zh-CN/content/admin/user-management/managing-repositories-in-your-enterprise/configuring-git-large-file-storage-for-your-enterprise.md,broken liquid tags
@@ -766,6 +765,7 @@ translations/zh-CN/content/codespaces/customizing-your-codespace/setting-your-ti
translations/zh-CN/content/codespaces/developing-in-codespaces/codespaces-lifecycle.md,broken liquid tags
translations/zh-CN/content/codespaces/developing-in-codespaces/connecting-to-a-private-network.md,broken liquid tags
translations/zh-CN/content/codespaces/developing-in-codespaces/creating-a-codespace.md,broken liquid tags
translations/zh-CN/content/codespaces/developing-in-codespaces/default-environment-variables-for-your-codespace.md,broken liquid tags
translations/zh-CN/content/codespaces/developing-in-codespaces/deleting-a-codespace.md,broken liquid tags
translations/zh-CN/content/codespaces/developing-in-codespaces/developing-in-a-codespace.md,broken liquid tags
translations/zh-CN/content/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace.md,broken liquid tags
@@ -802,6 +802,7 @@ translations/zh-CN/content/codespaces/troubleshooting/github-codespaces-logs.md,
translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-codespaces-clients.md,broken liquid tags
translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-creation-and-deletion-of-codespaces.md,broken liquid tags
translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-dotfiles-for-codespaces.md,broken liquid tags
translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-port-forwarding-for-github-codespaces.md,broken liquid tags
translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-prebuilds.md,broken liquid tags
translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-your-connection-to-github-codespaces.md,broken liquid tags
translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-github-codespaces.md,broken liquid tags
@@ -837,6 +838,7 @@ translations/zh-CN/content/developers/overview/about-githubs-apis.md,broken liqu
translations/zh-CN/content/developers/overview/managing-deploy-keys.md,broken liquid tags
translations/zh-CN/content/developers/overview/secret-scanning-partner-program.md,broken liquid tags
translations/zh-CN/content/developers/webhooks-and-events/events/issue-event-types.md,broken liquid tags
translations/zh-CN/content/developers/webhooks-and-events/webhooks/creating-webhooks.md,broken liquid tags
translations/zh-CN/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md,rendering error
translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/collaborating-with-maintainers-using-discussions.md,broken liquid tags
translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion.md,broken liquid tags
@@ -935,7 +937,7 @@ translations/zh-CN/content/organizations/managing-organization-settings/managing
translations/zh-CN/content/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization.md,rendering error
translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md,broken liquid tags
translations/zh-CN/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md,rendering error
translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization.md,broken liquid tags
translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization.md,rendering error
translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md,rendering error
translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md,broken liquid tags
translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md,broken liquid tags
@@ -1041,6 +1043,7 @@ translations/zh-CN/content/rest/enterprise-admin/scim.md,broken liquid tags
translations/zh-CN/content/rest/enterprise-admin/users.md,broken liquid tags
translations/zh-CN/content/rest/gitignore.md,broken liquid tags
translations/zh-CN/content/rest/guides/building-a-ci-server.md,broken liquid tags
translations/zh-CN/content/rest/guides/delivering-deployments.md,broken liquid tags
translations/zh-CN/content/rest/guides/getting-started-with-the-rest-api.md,rendering error
translations/zh-CN/content/rest/guides/traversing-with-pagination.md,rendering error
translations/zh-CN/content/rest/guides/working-with-comments.md,broken liquid tags
@@ -1098,7 +1101,6 @@ translations/zh-CN/data/reusables/actions/enterprise-postinstall-nextsteps.md,br
translations/zh-CN/data/reusables/actions/enterprise-storage-ha-backups.md,broken liquid tags
translations/zh-CN/data/reusables/actions/github-connect-resolution.md,broken liquid tags
translations/zh-CN/data/reusables/actions/ip-allow-list-self-hosted-runners.md,broken liquid tags
translations/zh-CN/data/reusables/actions/jobs/section-choosing-the-runner-for-a-job.md,broken liquid tags
translations/zh-CN/data/reusables/actions/jobs/section-defining-outputs-for-jobs.md,broken liquid tags
translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container.md,broken liquid tags
translations/zh-CN/data/reusables/actions/message-parameters.md,rendering error
1 file reason
340 translations/zh-CN/data/release-notes/enterprise-server/3-2/7.yml file deleted because it no longer exists in main
341 translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml file deleted because it no longer exists in main
342 translations/zh-CN/data/release-notes/enterprise-server/3-2/9.yml file deleted because it no longer exists in main
343 translations/zh-CN/data/reusables/actions/enterprise-s3-support-warning.md file deleted because it no longer exists in main
344 translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md file deleted because it no longer exists in main
345 translations/zh-CN/data/reusables/actions/link-to-example-library.md file deleted because it no longer exists in main
346 translations/zh-CN/data/reusables/actions/perform-blob-storage-precheck.md file deleted because it no longer exists in main
626 translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise.md broken liquid tags
627 translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/about-pre-receive-hooks.md broken liquid tags
628 translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md broken liquid tags
translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise.md broken liquid tags
629 translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md rendering error
630 translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md broken liquid tags
631 translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md rendering error
translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/index.md broken liquid tags
632 translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md rendering error
633 translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/restoring-a-deleted-organization.md broken liquid tags
634 translations/zh-CN/content/admin/user-management/managing-repositories-in-your-enterprise/configuring-git-large-file-storage-for-your-enterprise.md broken liquid tags
765 translations/zh-CN/content/codespaces/developing-in-codespaces/codespaces-lifecycle.md broken liquid tags
766 translations/zh-CN/content/codespaces/developing-in-codespaces/connecting-to-a-private-network.md broken liquid tags
767 translations/zh-CN/content/codespaces/developing-in-codespaces/creating-a-codespace.md broken liquid tags
768 translations/zh-CN/content/codespaces/developing-in-codespaces/default-environment-variables-for-your-codespace.md broken liquid tags
769 translations/zh-CN/content/codespaces/developing-in-codespaces/deleting-a-codespace.md broken liquid tags
770 translations/zh-CN/content/codespaces/developing-in-codespaces/developing-in-a-codespace.md broken liquid tags
771 translations/zh-CN/content/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace.md broken liquid tags
802 translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-codespaces-clients.md broken liquid tags
803 translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-creation-and-deletion-of-codespaces.md broken liquid tags
804 translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-dotfiles-for-codespaces.md broken liquid tags
805 translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-port-forwarding-for-github-codespaces.md broken liquid tags
806 translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-prebuilds.md broken liquid tags
807 translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-your-connection-to-github-codespaces.md broken liquid tags
808 translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-github-codespaces.md broken liquid tags
838 translations/zh-CN/content/developers/overview/managing-deploy-keys.md broken liquid tags
839 translations/zh-CN/content/developers/overview/secret-scanning-partner-program.md broken liquid tags
840 translations/zh-CN/content/developers/webhooks-and-events/events/issue-event-types.md broken liquid tags
841 translations/zh-CN/content/developers/webhooks-and-events/webhooks/creating-webhooks.md broken liquid tags
842 translations/zh-CN/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md rendering error
843 translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/collaborating-with-maintainers-using-discussions.md broken liquid tags
844 translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion.md broken liquid tags
937 translations/zh-CN/content/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization.md rendering error
938 translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md broken liquid tags
939 translations/zh-CN/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md rendering error
940 translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization.md broken liquid tags rendering error
941 translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md rendering error
942 translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md broken liquid tags
943 translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md broken liquid tags
1043 translations/zh-CN/content/rest/enterprise-admin/users.md broken liquid tags
1044 translations/zh-CN/content/rest/gitignore.md broken liquid tags
1045 translations/zh-CN/content/rest/guides/building-a-ci-server.md broken liquid tags
1046 translations/zh-CN/content/rest/guides/delivering-deployments.md broken liquid tags
1047 translations/zh-CN/content/rest/guides/getting-started-with-the-rest-api.md rendering error
1048 translations/zh-CN/content/rest/guides/traversing-with-pagination.md rendering error
1049 translations/zh-CN/content/rest/guides/working-with-comments.md broken liquid tags
1101 translations/zh-CN/data/reusables/actions/enterprise-storage-ha-backups.md broken liquid tags
1102 translations/zh-CN/data/reusables/actions/github-connect-resolution.md broken liquid tags
1103 translations/zh-CN/data/reusables/actions/ip-allow-list-self-hosted-runners.md broken liquid tags
translations/zh-CN/data/reusables/actions/jobs/section-choosing-the-runner-for-a-job.md broken liquid tags
1104 translations/zh-CN/data/reusables/actions/jobs/section-defining-outputs-for-jobs.md broken liquid tags
1105 translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container.md broken liquid tags
1106 translations/zh-CN/data/reusables/actions/message-parameters.md rendering error

View File

@@ -1,6 +1,6 @@
---
title: Configuring a repository cache
intro: 'You can configure a repository cache by creating a new appliance, connecting the repository cache to your primary appliance, and configuring replication of repository networks to the repository cache.'
intro: 'You can configure a repository cache for {% data variables.product.product_name %} by creating a new instance, connecting the repository cache to your primary instance, and configuring replication of repository networks to the repository cache.'
versions:
ghes: '*'
type: how_to
@@ -34,13 +34,14 @@ Then, when told to fetch `https://github.example.com/myorg/myrepo`, Git will ins
## Configuring a repository cache
{% ifversion ghes = 3.3 %}
1. On your primary {% data variables.product.prodname_ghe_server %} appliance, enable the feature flag for repository caching.
{% data reusables.enterprise_installation.ssh-into-instance %}
1. To enable repository caching, run the following command.
```
$ ghe-config cluster.cache-enabled true
```
{%- endif %}
1. Set up a new {% data variables.product.prodname_ghe_server %} appliance on your desired platform. This appliance will be your repository cache. For more information, see "[Setting up a {% data variables.product.prodname_ghe_server %} instance](/admin/guides/installation/setting-up-a-github-enterprise-server-instance)."
1. Set up a new {% data variables.product.prodname_ghe_server %} instance on your desired platform. This instance will be your repository cache. For more information, see "[Setting up a {% data variables.product.prodname_ghe_server %} instance](/admin/guides/installation/setting-up-a-github-enterprise-server-instance)."
{% data reusables.enterprise_installation.replica-steps %}
1. Connect to the repository cache's IP address using SSH.
@@ -62,11 +63,22 @@ Then, when told to fetch `https://github.example.com/myorg/myrepo`, Git will ins
$ ghe-repl-setup PRIMARY-IP
```
1. Set a `cache_location` for the repository cache, replacing *CACHE-LOCATION* with an alphanumeric identifier, such as the region where the cache is deployed. Also set a datacenter name for this cache; new caches will attempt to seed from another cache in the same datacenter.
{% ifversion ghes < 3.6 %}
1. Set a `cache-location` for the repository cache, replacing *CACHE-LOCATION* with an alphanumeric identifier, such as the region where the cache is deployed. Also set a datacenter name for this cache; new caches will attempt to seed from another cache in the same datacenter.
```shell
$ ghe-repl-node --cache CACHE-LOCATION --datacenter REPLICA-DC-NAME
```
{% else %}
1. To configure the repository cache, use the `ghe-repl-node` command and include the necessary parameters.
- Set a `cache-location` for the repository cache, replacing *CACHE-LOCATION* with an alphanumeric identifier, such as the region where the cache is deployed. The *CACHE-LOCATION* value must not be any of the subdomains reserved for use with subdomain isolation, such as `assets` or `media`. For a list of reserved names, see "[Enabling subdomain isolation](/enterprise/admin/guides/installation/enabling-subdomain-isolation#about-subdomain-isolation)."
- Set a `cache-domain` for the repository cache, replacing *EXTERNAL-CACHE-DOMAIN* with the hostname Git clients will use to access the repository cache. If you do not specify a `cache-domain`, {% data variables.product.product_name %} will prepend the *CACHE-LOCATION* value as a subdomain to the hostname configured for your instance. For more information, see "[Configuring a hostname](/admin/configuration/configuring-network-settings/configuring-a-hostname)."
- New caches will attempt to seed from another cache in the same datacenter. Set a `datacenter` for the repository cache, replacing *REPLICA-DC-NAME* with the name of the datacenter where you're deploying the node.
```shell
$ ghe-repl-node --cache CACHE-LOCATION --cache-domain EXTERNAL-CACHE-DOMAIN --datacenter REPLICA-DC-NAME
```
{% endif %}
{% data reusables.enterprise_installation.replication-command %}
{% data reusables.enterprise_installation.verify-replication-channel %}

View File

@@ -16,7 +16,13 @@ shortTitle: Amazon S3 storage
---
## Prerequisites
{% data reusables.actions.enterprise-s3-support-warning %}
{% note %}
**Note:** The only {% data variables.product.prodname_dotcom %}-supported S3 storage providers are Amazon S3 and MinIO Gateway for NAS.
{% data reusables.actions.enterprise-s3-tech-partners %}
{% endnote %}
Before enabling {% data variables.product.prodname_actions %}, make sure you have completed the following steps:

View File

@@ -135,7 +135,9 @@ To enable {% data variables.product.prodname_actions %} on {% data variables.pro
{% note %}
**Note:** These are the only storage providers that {% data variables.product.company_short %} supports and can provide assistance with. Other S3 API-compatible storage providers are unlikely to work due to differences from the S3 API. [Contact us](https://support.github.com/contact) to request support for additional storage providers.
**Note:** These are the only storage providers that {% data variables.product.company_short %} supports and can provide assistance with.
{% data reusables.actions.enterprise-s3-tech-partners %}
{% endnote %}

View File

@@ -1,6 +1,6 @@
---
title: Adding organizations to your enterprise
intro: You can add organizations to manage within your enterprise by creating a new organization, inviting an existing organization, or transferring an organization from a different enterprise account.
title: 将组织添加到企业
intro: 可以通过创建新组织、邀请现有组织或从其他企业帐户转移组织来添加要在企业中进行管理的组织。
redirect_from:
- /github/setting-up-and-managing-your-enterprise/managing-organizations-in-your-enterprise-account/adding-organizations-to-your-enterprise-account
- /articles/adding-organizations-to-your-enterprise-account
@@ -15,78 +15,83 @@ topics:
- Organizations
shortTitle: Add organizations
permissions: Enterprise owners can add organizations to an enterprise.
ms.openlocfilehash: 7b5627eb89e7e5356716a9cd2a9dfe03fd455270
ms.sourcegitcommit: e98b752895109965b32cb277610985da5799f8a1
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 11/01/2022
ms.locfileid: '148127617'
---
## 关于将组织添加到企业帐户
## About addition of organizations to your enterprise account
您的企业帐户可以拥有组织。 企业成员可以跨组织内的相关项目进行协作。 有关详细信息,请参阅“[关于组织](/organizations/collaborating-with-groups-in-organizations/about-organizations)”。
Your enterprise account can own organizations. Members of your enterprise can collaborate across related projects within an organization. For more information, see "[About organizations](/organizations/collaborating-with-groups-in-organizations/about-organizations)."
可将新组织添加到企业帐户。 如果不使用 {% data variables.product.prodname_emus %},可将 {% data variables.location.product_location %} 上的现有组织添加到企业。 不能将 {% data variables.enterprise.prodname_emu_enterprise %} 中的现有组织添加到其他企业。
You can add new organizations to your enterprise account. If you do not use {% data variables.product.prodname_emus %}, you can add existing organizations on {% data variables.location.product_location %} to your enterprise. You cannot add an existing organization from an {% data variables.enterprise.prodname_emu_enterprise %} to a different enterprise.
{% data reusables.enterprise.create-an-enterprise-account %} 有关详细信息,请参阅“[创建企业帐户](/admin/overview/creating-an-enterprise-account)”。
{% data reusables.enterprise.create-an-enterprise-account %} For more information, see "[Creating an enterprise account](/admin/overview/creating-an-enterprise-account)."
将现有组织添加到企业后,该组织的资源仍可供同一 URL 的成员访问,并且以下更改将会应用。
After you add an existing organization to your enterprise, the organization's resources remain accessible to members at the same URLs, and the following changes will apply.
- 组织的成员将成为企业成员,并且 {% data variables.product.company_short %} 将按组织的使用情况向企业帐户收费。 必须确保企业帐户有足够的许可证来容纳任何新成员。 有关详细信息,请参阅“[关于企业的计费](/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise)”。
- 企业所有者可管理他们在组织内的角色。 有关详细信息,请参阅“[管理企业拥有的组织中的角色](/admin/user-management/managing-organizations-in-your-enterprise/managing-your-role-in-an-organization-owned-by-your-enterprise)”。
- 应用于企业的任何策略都将应用于组织。 有关详细信息,请参阅“[关于企业策略](/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies)”。
- 如果为企业帐户配置了 SAML SSO则企业的 SAML 配置将应用于组织。 如果组织使用了 SAML SSO则企业帐户的配置将替换组织的配置。 SCIM 不适用于企业帐户,因此将为组织禁用 SCIM。 有关详细信息,请参阅“[为企业配置 SAML 单一登录](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise)”和“[将 SAML 配置从组织切换到企业帐户](/admin/identity-and-access-management/using-saml-for-enterprise-iam/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account)”。
- 如果为组织配置了 SAML SSO则成员有权访问组织资源的现有 {% data variables.product.pat_generic %} 或 SSH 密钥将有权访问相同的资源。 要访问企业拥有的其他组织,成员必须授权 {% data variables.product.pat_generic %} 或密钥。 有关详细信息,请参阅“[授权用于 SAML 单一登录的{% data variables.product.pat_generic %}](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)”和“[授权用于 SAML 单一登录的 SSH 密钥](/authentication/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on)”。
- 如果组织通过 {% data variables.product.prodname_github_connect %} 连接到 {% data variables.product.prodname_ghe_server %} 或 {% data variables.product.prodname_ghe_managed %},则将组织添加到企业帐户不会更新连接。 {% data variables.product.prodname_github_connect %} 功能将不再适用于组织。 要继续使用 {% data variables.product.prodname_github_connect %},必须禁用并重新启用该功能。 有关详细信息,请参阅以下文章。
- The organization's members will become members of the enterprise, and {% data variables.product.company_short %} will bill the enterprise account for the organization's usage. You must ensure that the enterprise account has enough licenses to accommodate any new members. For more information, see "[About billing for your enterprise](/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise)."
- Enterprise owners can manage their role within the organization. For more information, see "[Managing your role in an organization owned by your enterprise](/admin/user-management/managing-organizations-in-your-enterprise/managing-your-role-in-an-organization-owned-by-your-enterprise)."
- Any policies applied to the enterprise will apply to the organization. For more information, see "[About enterprise policies](/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies)."
- If SAML SSO is configured for the enterprise account, the enterprise's SAML configuration will apply to the organization. If the organization used SAML SSO, the enterprise account's configuration will replace the organization's configuration. SCIM is not available for enterprise accounts, so SCIM will be disabled for the organization. For more information, see "[Configuring SAML single sign-on for your enterprise](/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise)" and "[Switching your SAML configuration from an organization to an enterprise account](/admin/identity-and-access-management/using-saml-for-enterprise-iam/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account)."
- If SAML SSO was configured for the organization, members' existing {% data variables.product.pat_generic %} or SSH keys that were authorized to access the organization's resources will be authorized to access the same resources. To access additional organizations owned by the enterprise, members must authorize the {% data variables.product.pat_generic %} or key. For more information, see "[Authorizing a {% data variables.product.pat_generic %} for use with SAML single sign-on](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)" and "[Authorizing an SSH key for use with SAML single sign-on](/authentication/authenticating-with-saml-single-sign-on/authorizing-an-ssh-key-for-use-with-saml-single-sign-on)."
- If the organization was connected to {% data variables.product.prodname_ghe_server %} or {% data variables.product.prodname_ghe_managed %} using {% data variables.product.prodname_github_connect %}, adding the organization to an enterprise will not update the connection. {% data variables.product.prodname_github_connect %} features will no longer function for the organization. To continue using {% data variables.product.prodname_github_connect %}, you must disable and re-enable the feature. For more information, see the following articles.
- {% data variables.product.prodname_ghe_server %} 文档中的“[管理 {% data variables.product.prodname_github_connect %}](/enterprise-server@latest/admin/configuration/configuring-github-connect/managing-github-connect)”
- {% data variables.product.prodname_ghe_managed %} 文档中的“[管理 {% data variables.product.prodname_github_connect %}](/github-ae@latest/admin/configuration/configuring-github-connect/managing-github-connect)”
- 如果组织使用计费的 {% data variables.product.prodname_marketplace %} 应用,则组织可继续使用这些应用,但必须直接向供应商支付费用。 有关详细信息,请与应用供应商联系。
- 将从组织中删除任何优惠券。 若要重新应用优惠券,[请联系我们的销售团队](https://github.com/enterprise/contact)
- "[Managing {% data variables.product.prodname_github_connect %}](/enterprise-server@latest/admin/configuration/configuring-github-connect/managing-github-connect)" in the {% data variables.product.prodname_ghe_server %} documentation
- "[Managing {% data variables.product.prodname_github_connect %}](/github-ae@latest/admin/configuration/configuring-github-connect/managing-github-connect)" in the {% data variables.product.prodname_ghe_managed %} documentation
- If the organization used billed {% data variables.product.prodname_marketplace %} apps, the organization can continue to use the apps, but must pay the vendor directly. For more information, contact the app's vendor.
- Any coupons will be removed from the organization. To reapply the coupon, [contact our sales team](https://github.com/enterprise/contact).
## 在企业帐户中创建组织
## Creating an organization in your enterprise account
在企业帐户设置中创建的新组织包含在企业帐户的 {% data variables.product.prodname_ghe_cloud %} 订阅中。
New organizations you create within your enterprise account settings are included in your enterprise account's {% data variables.product.prodname_ghe_cloud %} subscription.
Enterprise owners who create an organization owned by the enterprise account automatically become organization owners. For more information about organization owners, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)."
创建企业帐户所拥有的组织的企业所有者自动成为组织所有者。 有关组织所有者的详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”。
{% data reusables.enterprise-accounts.access-enterprise %}
2. On the **Organizations** tab, above the list of organizations, click **New organization**.
![New organization button](/assets/images/help/business-accounts/enterprise-account-add-org.png)
3. Under "Organization name", type a name for your organization.
![Field to type a new organization name](/assets/images/help/business-accounts/new-organization-name-field.png)
4. Click **Create organization**.
5. Under "Invite owners", type the username of a person you'd like to invite to become an organization owner, then click **Invite**.
![Organization owner search field and Invite button](/assets/images/help/business-accounts/invite-org-owner.png)
6. Click **Finish**.
2. 在“组织”选项卡中的组织列表上方,单击“新建组织” .
![“新建组织”按钮](/assets/images/help/business-accounts/enterprise-account-add-org.png)
3. "Organization name"(组织名称)下,输入组织的名称。
![用于键入新组织名称的字段](/assets/images/help/business-accounts/new-organization-name-field.png)
4. 单击“创建组织”。
5. 在“邀请所有者”下,键入想邀其成为组织所有者的人员的用户名,然后单击“邀请”。
![组织所有者搜索字段和“邀请”按钮](/assets/images/help/business-accounts/invite-org-owner.png)
6. 单击“完成”。
## Inviting an organization to join your enterprise account
## 邀请组织加入您的企业帐户
Enterprise owners can invite existing organizations to join their enterprise account. If the organization you want to invite is already owned by another enterprise account, you must be an owner of both enterprise accounts, or the previous enterprise must give up ownership of the organization first. For more information, see "[Removing an organization from your enterprise](/admin/user-management/managing-organizations-in-your-enterprise/removing-organizations-from-your-enterprise)."
企业所有者可以邀请现有组织加入其企业帐户。 如果要邀请的组织已经归其他企业所有,则你必须是两个企业帐户的所有者,或者之前的企业必须先放弃对该组织的所有权。 有关详细信息,请参阅“[从企业中删除组织](/admin/user-management/managing-organizations-in-your-enterprise/removing-organizations-from-your-enterprise)”。
{% data reusables.enterprise-accounts.access-enterprise %}
1. On the **Organizations** tab, above the list of organizations, click **Invite organization**.
![Invite organization](/assets/images/help/business-accounts/enterprise-account-invite-organization.png)
3. Under "Organization name", start typing the name of the organization you want to invite and select it when it appears in the dropdown list.
![Search for organization](/assets/images/help/business-accounts/enterprise-account-search-for-organization.png)
4. Click **Invite organization**.
5. The organization owners will receive an email inviting them to join the enterprise. At least one owner needs to accept the invitation before the process can continue. You can cancel or resend the invitation at any time before an owner approves it.
![Cancel or resend](/assets/images/help/business-accounts/enterprise-account-invitation-sent.png)
6. Once an organization owner has approved the invitation, you can view its status in the list of pending invitations.
![Pending invitation](/assets/images/help/business-accounts/enterprise-account-pending.png)
7. To complete the transfer, click **Approve**.
![Approve invitation](/assets/images/help/business-accounts/enterprise-account-transfer-approve.png)
1. 在“组织”选项卡中的组织列表上方,单击“邀请组织” 。
![邀请组织](/assets/images/help/business-accounts/enterprise-account-invite-organization.png)
3. 在“组织名称”下,开始键入要邀请的组织的名称,并在它出现在下拉列表中时选择它。
![搜索组织](/assets/images/help/business-accounts/enterprise-account-search-for-organization.png)
4. 单击“邀请组织”。
5. 组织所有者将收到一封邀请他们加入企业的电子邮件。 至少有一个所有者接受邀请才能继续该过程。 您可以在所有者批准邀请之前随时取消或重新发送邀请。
![取消或重新发送](/assets/images/help/business-accounts/enterprise-account-invitation-sent.png)
6. 一旦组织所有者批准了邀请,您可以在待定邀请列表中查看其状态。
![待定邀请](/assets/images/help/business-accounts/enterprise-account-pending.png)
7. 要完成转移,请单击“批准”。
![批准邀请](/assets/images/help/business-accounts/enterprise-account-transfer-approve.png)
## Transferring an organization between enterprise accounts
## 在企业帐户之间转移组织
Enterprise owners can transfer existing organizations between enterprise accounts. You must be an enterprise owner of both enterprise accounts.
企业所有者可以在企业帐户之间转移现有组织。 你必须是两个企业帐户的企业所有者。
{% note %}
**Note:** You cannot transfer an existing organization to or from an {% data variables.enterprise.prodname_emu_enterprise %}.
注意:不能向/从 {% data variables.enterprise.prodname_emu_enterprise %} 转移现有组织。
{% endnote %}
{% data reusables.enterprise-accounts.access-enterprise %}
1. Next to the organization you want to transfer, select the {% octicon "gear" width="16" aria-label="Gear" %} dropdown, and then click **Transfer organization**.
![Screenshot of the transfer button](/assets/images/help/business-accounts/org-transfer-button.png)
1. Select the **Select enterprise** dropdown menu, start typing the name of the destination enterprise, and select the enterprise when it appears in the dropdown list.
![Screenshot of the enterprise dropdown](/assets/images/help/business-accounts/org-transfer-select-enterprise.png)
2. Click **Review transfer**.
3. To confirm the transfer, click **Transfer organization**.
![Screenshot of the transfer organization button](/assets/images/help/business-accounts/org-transfer-confirm-button.png)
1. 在要转移的组织旁边,选择 {% octicon "gear" width="16" aria-label="Gear" %} 下拉列表,然后单击“转移组织”。
![“转移”按钮的屏幕截图](/assets/images/help/business-accounts/org-transfer-button.png)
1. 选择“选择企业”下拉菜单,开始键入目标企业的名称,并在它出现在下拉列表中时选择它。
![“企业”下拉列表的屏幕截图](/assets/images/help/business-accounts/org-transfer-select-enterprise.png)
2. 单击“审查转移”。
3. 要确认转移,请单击“转移组织”。
![“转移组织”按钮的屏幕截图](/assets/images/help/business-accounts/org-transfer-confirm-button.png)

View File

@@ -1,5 +1,5 @@
---
title: Managing organizations in your enterprise
title: 管理企业中的组织
redirect_from:
- /enterprise/admin/articles/adding-users-and-teams
- /enterprise/admin/categories/admin-bootcamp
@@ -12,7 +12,7 @@ redirect_from:
- /github/setting-up-and-managing-your-enterprise/managing-organizations-in-your-enterprise-account/managing-unowned-organizations-in-your-enterprise-account
- /github/setting-up-and-managing-your-enterprise-account/managing-unowned-organizations-in-your-enterprise-account
- /github/setting-up-and-managing-your-enterprise/managing-unowned-organizations-in-your-enterprise-account
intro: 'You can use organizations to group users within your company, such as divisions or groups working on similar projects, and manage access to repositories.'
intro: 可以使用组织对公司内的用户进行分组(例如处理类似项目的部门或组),并管理对存储库的访问权限。
versions:
ghec: '*'
ghes: '*'
@@ -33,5 +33,11 @@ children:
- /managing-projects-using-jira
- /continuous-integration-using-jenkins
shortTitle: Manage organizations
ms.openlocfilehash: e2fade6385a690d1ca91b587f2d7ca3e081bd23b
ms.sourcegitcommit: e98b752895109965b32cb277610985da5799f8a1
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 11/01/2022
ms.locfileid: '148127609'
---

View File

@@ -90,6 +90,8 @@ The `autobuild` process attempts to autodetect a suitable build method for C# us
If `autobuild` detects multiple solution or project files at the same (shortest) depth from the top level directory, it will attempt to build all of them.
3. Invoke a script that looks like a build script—_build_ and _build.sh_ (in that order, for Linux) or _build.bat_, _build.cmd_, _and build.exe_ (in that order, for Windows).
{% ifversion codeql-go-autobuild %}
### Go
| Supported system type | System name |
@@ -104,6 +106,8 @@ The `autobuild` process attempts to autodetect a suitable way to install the dep
3. Finally, if configurations files for these dependency managers are not found, rearrange the repository directory structure suitable for addition to `GOPATH`, and use `go get` to install dependencies. The directory structure reverts to normal after extraction completes.
4. Extract all Go code in the repository, similar to running `go build ./...`.
{% endif %}
### Java
| Supported system type | System name |

View File

@@ -84,7 +84,7 @@ When you enable {% data variables.product.prodname_secret_scanning %} for a repo
If {% data variables.product.prodname_secret_scanning %} detects a secret, {% data variables.product.prodname_dotcom %} generates an alert.
- {% data variables.product.prodname_dotcom %} sends an email alert to the repository administrators and organization owners. You'll receive an alert if you are watching the repository, or if you have enabled notifications for security alerts, or for all the activity on the repository.
- {% data variables.product.prodname_dotcom %} sends an email alert to the repository administrators and organization owners. You'll receive an alert if you are watching the repository, and if you have enabled notifications either for security alerts or for all the activity on the repository.
{% ifversion ghes or ghae or ghec %}
- If the contributor who committed the secret isn't ignoring the repository, {% data variables.product.prodname_dotcom %} will also send an email alert to the contributor. The emails contains a link to the related {% data variables.product.prodname_secret_scanning %} alert. The commit author can then view the alert in the repository, and resolve the alert.
{% endif %}

View File

@@ -1,8 +1,8 @@
---
title: 代码空间的默认环境变量
title: Default environment variables for your codespace
shortTitle: Default environment variables
product: '{% data reusables.gated-features.codespaces %}'
intro: '{% data variables.product.prodname_dotcom %} 为每个代码空间设置默认环境变量。'
intro: '{% data variables.product.prodname_dotcom %} sets default environment variables for each codespace.'
versions:
fpt: '*'
ghec: '*'
@@ -11,34 +11,30 @@ topics:
- Codespaces
- Fundamentals
- Developer
ms.openlocfilehash: bcff0f06aad7eb930b47f4b9cb32e42c067d07cf
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 09/05/2022
ms.locfileid: '147614341'
---
## 关于默认环境变量
{% data variables.product.prodname_dotcom %} 为每个代码空间设置默认环境变量。 在代码空间中运行的命令可以创建、读取和修改环境变量。
## About default environment variables
{% data variables.product.prodname_dotcom %} sets default environment variables for every codespace. Commands run in codespaces can create, read, and modify environment variables.
{% note %}
**注意**:环境变量区分大小写。
**Note**: Environment variables are case-sensitive.
{% endnote %}
## 默认环境变量列表
## List of default environment variables
| 环境变量 | 说明 |
| Environment variable | Description |
| ---------------------|------------ |
| `CODESPACE_NAME` | 代码空间的名称 例如,`monalisa-github-hello-world-2f2fsdf2e` |
| `CODESPACES` | 在代码空间中始终为 `true` |
| `GIT_COMMITTER_EMAIL` | 未来 `git` 提交的“作者”字段的电子邮件。 |
| `GIT_COMMITTER_NAME` | 未来 `git` 提交的“提交者”字段的名称。 |
| `GITHUB_API_URL` | 返回 API URL。 例如,`{% data variables.product.api_url_code %}` |
| `GITHUB_GRAPHQL_URL` | 返回 GraphQL API URL。 例如,`{% data variables.product.graphql_url_code %}` |
| `GITHUB_REPOSITORY` | 所有者和仓库名称。 例如,`octocat/Hello-World` |
| `GITHUB_SERVER_URL`| 返回 {% data variables.product.product_name %} 服务器的 URL。 例如,`https://{% data variables.product.product_url %}` |
| `GITHUB_TOKEN` | 代表代码空间中用户的签名身份验证令牌。 您可以使用它对 GitHub API 进行经过身份验证的调用。 有关详细信息,请参阅“[身份验证](/codespaces/codespaces-reference/security-in-codespaces#authentication)”。 |
| `GITHUB_USER` | 启动代码空间的用户的名称。 例如,`octocat` |
| `CODESPACE_NAME` | The name of the codespace For example, `monalisa-github-hello-world-2f2fsdf2e` |
| `CODESPACES` | Always `true` while in a codespace |
| `GIT_COMMITTER_EMAIL` | The email for the "author" field of future `git` commits. |
| `GIT_COMMITTER_NAME` | The name for the "committer" field of future `git` commits. |
| `GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN`| Returns the domain of the {% data variables.product.prodname_github_codespaces %} forwarded port. For example, `preview.app.github.dev`. |
| `GITHUB_API_URL` | Returns the API URL. For example, `{% data variables.product.api_url_code %}`. |
| `GITHUB_GRAPHQL_URL` | Returns the GraphQL API URL. For example, `{% data variables.product.graphql_url_code %}`. |
| `GITHUB_REPOSITORY` | The owner and repository name. For example, `octocat/Hello-World`. |
| `GITHUB_SERVER_URL`| Returns the URL of the {% data variables.product.product_name %} server. For example, `https://{% data variables.product.product_url %}`. |
| `GITHUB_TOKEN` | A signed auth token representing the user in the codespace. You can use this to make authenticated calls to the GitHub API. For more information, see "[Authentication](/codespaces/codespaces-reference/security-in-codespaces#authentication)." |
| `GITHUB_USER` | The name of the user that initiated the codespace. For example, `octocat`. |

View File

@@ -23,6 +23,8 @@ When an application running inside a codespace prints output to the terminal tha
![Automatic port forwarding](/assets/images/help/codespaces/automatic-port-forwarding.png)
{% data reusables.codespaces.forwarded-ports-environment-variable %}
You can also forward a port manually, label forwarded ports, share forwarded ports with members of your organization, share forwarded ports publicly, and add forwarded ports to the codespace configuration.
{% note %}
@@ -48,7 +50,7 @@ You can manually forward a port that wasn't forwarded automatically.
## Using HTTPS forwarding
By default, {% data variables.product.prodname_github_codespaces %} forwards ports using HTTP but you can update any port to use HTTPS, as needed.
By default, {% data variables.product.prodname_github_codespaces %} forwards ports using HTTP but you can update any port to use HTTPS, as needed. If you update a port with public visibility to use HTTPS, the port's visibility will automatically change to private.
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Right click the port you want to update, then hover over **Change Port Protocol**.

View File

@@ -1,6 +1,6 @@
---
title: GitHub Codespaces 的端口转发疑难解答
intro: 常见端口转发问题的疑难解答步骤。
title: Troubleshooting port forwarding for GitHub Codespaces
intro: Troubleshooting steps for common port forwarding issues.
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
@@ -11,20 +11,17 @@ topics:
shortTitle: Port forwarding
redirect_from:
- /codespaces/troubleshooting/troubleshooting-port-forwarding-for-codespaces
ms.openlocfilehash: 326c96e86883604ecc1f4ebcb81be98dae23bf84
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 09/05/2022
ms.locfileid: '147111481'
---
在 codespace 内运行的应用程序向控制台输出端口时,{% data variables.product.prodname_github_codespaces %} 将检测到 localhost URL 模式并自动转发端口。 有关详细信息,请参阅“[在 codespace 中转发端口](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)”。
如果端口未自动转发,则可以手动转发该端口。 有关详细信息,请参阅“[转发端口](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace#forwarding-a-port)”。
When an application running inside a codespace outputs a port to the console, {% data variables.product.prodname_github_codespaces %} detects the localhost URL pattern and automatically forwards the port. For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
如果设置了端口转发,请检查以下各项:
If a port is not automatically forwarded, you can forward it manually. For more information, see "[Forwarding a port](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace#forwarding-a-port)."
- 使用通知提示或点击终端中的 URL 打开转发的端口。 如果通过浏览器连接到 codespace则在本地计算机上键入 `localhost:8000`(作为示例)将不起作用。
- 确保检查应用程序是否仍在代码空间中运行。 如果代码空间在一段时间不活动后停止,则需要确保在代码空间重新启动后重新启动应用程序。
If port forwarding is set up, check the following:
通常,可使转发端口可公开访问,也可在拥有存储库的组织内访问。 有关详细信息,请参阅“[在 codespace 中转发端口](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)”。 如果公共或组织可见性选项中的任何一个或两者都不可用,则表示已配置了组织级别的策略。 有关详细信息,请参阅“[限制转发端口的可见性](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)”。
- Use the notification toast or click the URL in Terminal to open the forwarded port. Typing in `localhost:8000` (as an example) to your local machine will not work if you're connected to the codespace via the browser.
- Make sure to check that your application is still running from within your codespace. If your codespace has stopped after a period of inactivity, you'll need to ensure to restart your application once the codespace has restarted.
Typically, you can make a forwarded port accessible publicly, or within the organization that owns a repository. For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)." If either, or both, of the options for public or organization visibility are not available, this indicates that an organization-level policy has been configured. For more information, see "[Restricting the visibility of forwarded ports](/codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports)."
{% data reusables.codespaces.forwarded-ports-environment-variable %}

View File

@@ -1,6 +1,6 @@
---
title: 创建 web 挂钩
intro: '了解如何构建 web 挂钩,选择 web 挂钩将在 {% data variables.product.prodname_dotcom %} 上侦听的事件,以及如何设置服务器以接收和管理 web 挂钩负载。'
title: Creating webhooks
intro: 'Learn to build a webhook, choosing the events your webhook will listen for on {% data variables.product.prodname_dotcom %} and how to set up a server to receive and manage the webhook payload.'
redirect_from:
- /webhooks/creating
- /developers/webhooks-and-events/creating-webhooks
@@ -11,79 +11,85 @@ versions:
ghec: '*'
topics:
- Webhooks
ms.openlocfilehash: f07c5de7acd3c5be5236765236d24a6938e3b91f
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 09/11/2022
ms.locfileid: '145097984'
---
学完 [webhook 的基础知识][webhooks-overview]后,接下来了解如何生成自己的基于 webhook 的集成。 在本教程中,我们将创建一个仓库 web 挂钩,它将负责根据仓库每天收到的议题数量列出仓库的受欢迎程度。
Now that we understand [the basics of webhooks][webhooks-overview], let's go through the process of building out our own webhook-powered integration. In this tutorial, we'll create a repository webhook that will be responsible for listing out how popular our repository is, based on the number of issues it receives per day.
创建 web 挂钩是一个两步过程。 首先需要设置 web 挂钩通过 {% data variables.product.product_name %} 实施的行为 - 它应该侦听哪些事件。 之后,您将设置服务器以接收和管理有效负载。
Creating a webhook is a two-step process. You'll first need to set up what events you webhook should listen to. After that, you'll set up your server to receive and manage the payload.
{% data reusables.webhooks.webhooks-rest-api-links %}
## 向互联网显示本地主机
## Exposing localhost to the internet
在本教程中,我们将使用本地服务器接收来自 {% data variables.product.prodname_dotcom %} 的消息。 因此,首先,我们需要将我们的本地发展环境显示给互联网。 我们将使用 ngrok 实现此目的。 所有主要操作系统均可免费使用 ngrok。 有关详细信息,请参阅 [`ngrok` 下载页面](https://ngrok.com/download)。
For the purposes of this tutorial, we're going to use a local server to receive webhook events from {% data variables.product.prodname_dotcom %}.
安装 `ngrok` 后,可以通过在命令行上运行 `./ngrok http 4567` 来公开本地主机。 4567 是我们服务器侦听消息的端口号。 您应该会看到如下所示的行:
First of all, we need to expose our local development environment to the internet so {% data variables.product.prodname_dotcom %} can deliver events. We'll use [`ngrok`](https://ngrok.com) to do this.
{% ifversion cli-webhook-forwarding %}
{% note %}
**Note:** Alternatively, you can use webhook forwarding to set up your local environment to receive webhooks. For more information, see "[Receiving webhooks with the GitHub CLI](/developers/webhooks-and-events/webhooks/receiving-webhooks-with-the-github-cli)."
{% endnote %}
{% endif %}
`ngrok` is available, free of charge, for all major operating systems. For more information, see [the `ngrok` download page](https://ngrok.com/download).
After installing `ngrok`, you can expose your localhost by running `./ngrok http 4567` on the command line. `4567` is the port number on which our server will listen for messages. You should see a line that looks something like this:
```shell
$ Forwarding http://7e9ea9dc.ngrok.io -> 127.0.0.1:4567
$ Forwarding http://7e9ea9dc.ngrok.io -> 127.0.0.1:4567
```
记下 `*.ngrok.io` URL。 我们将用它来设置 web 挂钩。
Make a note of the `*.ngrok.io` URL. We'll use it to set up our webhook.
## 设置 Webhook
## Setting up a webhook
您可以在组织或特定仓库上安装 web 挂钩。
You can install webhooks on an organization or on a specific repository.
要设置 web 挂钩,请转到仓库或组织的设置页面。 然后依次单击“Webhook”和“添加 Webhook” 。
To set up a webhook, go to the settings page of your repository or organization. From there, click **Webhooks**, then **Add webhook**.
另外,你可以选择[使用 Webhook API][webhook-api] 生成和管理 Webhook。
Alternatively, you can choose to build and manage a webhook [through the Webhooks API][webhook-api].
Web 挂钩需要设置几个配置选项才能使用。 我们将在下面介绍所有这些设置。
Webhooks require a few configuration options before you can make use of them. We'll go through each of these settings below.
## 有效负载 URL
## Payload URL
{% data reusables.webhooks.payload_url %}
由于我们为本教程进行本地开发,因此将其设置为 `*.ngrok.io` URL且后接 `/payload`。 例如 `http://7e9ea9dc.ngrok.io/payload`
Since we're developing locally for our tutorial, we'll set it to the `*.ngrok.io` URL, followed by `/payload`. For example, `http://7e9ea9dc.ngrok.io/payload`.
## 内容类型
## Content type
{% data reusables.webhooks.content_type %} 对于本教程,默认的内容类型 `application/json` 适用。
{% data reusables.webhooks.content_type %} For this tutorial, the default content type of `application/json` is fine.
## 机密
## Secret
{% data reusables.webhooks.secret %}
## SSL 验证
## SSL verification
{% data reusables.webhooks.webhooks_ssl %}
## 活动
## Active
默认情况下web 挂钩交付为“Active激活”。 您可以通过取消选择“Active激活”来选择禁用 web 挂钩交付。
By default, webhook deliveries are "Active." You can choose to disable the delivery of webhook payloads by deselecting "Active."
## 事件
## Events
事件是 web 挂钩的核心。 当仓库上发生特定操作时,就会触发这些 web 挂钩,而服务器的有效负载 URL 会截获它们并采取行动。
Events are at the core of webhooks. These webhooks fire whenever a certain action is taken on the repository, which your server's payload URL intercepts and acts upon.
可在 [webhook API][hooks-api] 参考中找到完整的 webhook 事件列表及其执行时间。
A full list of webhook events, and when they execute, can be found in [the webhooks API][hooks-api] reference.
由于 webhook 正在处理存储库中的问题,因此单击“选择单个事件”,然后单击“问题” 。 请确保选择“可用”以接收触发的 Webhook 的问题事件。 您还可以使用默认选项选择所有事件。
Since our webhook is dealing with issues in a repository, we'll click **Let me select individual events** and then **Issues**. Make sure you select **Active** to receive issue events for triggered webhooks. You can also select all events using the default option.
完成后,单击“添加 Webhook”。
When you're finished, click **Add webhook**.
现在您创建了 web 挂钩,是时候设置我们的本地服务器来测试 web 挂钩了。 转到[配置服务器](/webhooks/configuring/),了解如何实现这一目标。
Now that you've created the webhook, it's time to set up our local server to test the webhook. Head on over to [Configuring Your Server](/webhooks/configuring/) to learn how to do that.
### 通配符事件
### Wildcard event
要为所有事件配置 webhook请使用通配符 (`*`) 指定 webhook 事件。 添加通配符事件时,我们将用通配符事件替换您配置的任何现有事件,并向您发送所有受支持事件的有效负载。 您还会自动获取我们可能在将来添加的任何新事件。
To configure a webhook for all events, use the wildcard (`*`) character to specify the webhook events. When you add the wildcard event, we'll replace any existing events you have configured with the wildcard event and send you payloads for all supported events. You'll also automatically get any new events we might add in the future.
[webhooks-overview]: /webhooks/
[webhook-api]: /rest/reference/repos#hooks

View File

@@ -14,12 +14,13 @@ children:
- /configuring-your-server-to-receive-payloads
- /testing-webhooks
- /securing-your-webhooks
- /receiving-webhooks-with-the-github-cli
- /webhook-events-and-payloads
ms.openlocfilehash: a483c6d35ee1b7fee5e7dec948abdc5c65cc2400
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.openlocfilehash: a73820b100e94caa7c5eabe2f01a4814fe0df2a3
ms.sourcegitcommit: 6b1c6174d0df40c90edfd7526496baabb1dd159d
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 09/11/2022
ms.locfileid: '145097982'
ms.lasthandoff: 11/04/2022
ms.locfileid: '148132953'
---

View File

@@ -12,12 +12,12 @@ versions:
topics:
- Organizations
- Teams
ms.openlocfilehash: 7412c38e647ddec33543bd04d38d813bf6a93c88
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
ms.openlocfilehash: e18c95475e06db0623aee67515eeb6d8a1ee641f
ms.sourcegitcommit: e98b752895109965b32cb277610985da5799f8a1
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 10/25/2022
ms.locfileid: '148108080'
ms.lasthandoff: 11/01/2022
ms.locfileid: '148127633'
---
## 关于组织
@@ -47,7 +47,9 @@ ms.locfileid: '148108080'
{% ifversion ghec %} {% data reusables.enterprise.create-an-enterprise-account %}有关详细信息,请参阅“[创建企业帐户](/admin/overview/creating-an-enterprise-account)”。
{% data reusables.enterprise-accounts.invite-organization %} {% endif %} {% endif %}
{% data reusables.enterprise-accounts.invite-organization %}
{% endif %} {% endif %}
{% ifversion fpt or ghec %}
## 组织的服务条款和数据保护

View File

@@ -23,11 +23,11 @@ children:
- /managing-security-managers-in-your-organization
- /managing-moderators-in-your-organization
shortTitle: Manage access with roles
ms.openlocfilehash: 4e020ec73b09e5144be57c4efdc47f19a3b8b557
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.openlocfilehash: b687648202fc9e01f99aec644e167e014c1261b1
ms.sourcegitcommit: ca040a1871ab5e929b596686ef955b02c5afa051
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 09/05/2022
ms.locfileid: '145065964'
ms.lasthandoff: 11/02/2022
ms.locfileid: '148130997'
---

View File

@@ -29,9 +29,17 @@ Our CI system and host server will be figments of our imagination. They could be
Travis, Jenkins, or something else entirely. The crux of this guide will be setting up
and configuring the server managing the communication.
If you haven't already, be sure to [download ngrok][ngrok], and learn how
If you haven't already, [download `ngrok`][ngrok], and learn how
to [use it][using ngrok]. We find it to be a very useful tool for exposing local
connections.
applications to the internet.
{% ifversion cli-webhook-forwarding %}
{% note %}
**Note:** Alternatively, you can use webhook forwarding to set up your local environment to receive webhooks. For more information, see "[Receiving webhooks with the GitHub CLI](/developers/webhooks-and-events/webhooks/receiving-webhooks-with-the-github-cli)."
{% endnote %}
{% endif %}
Note: you can download the complete source code for this project
[from the platform-samples repo][platform samples].
@@ -54,14 +62,14 @@ end
(If you're unfamiliar with how Sinatra works, we recommend [reading the Sinatra guide][Sinatra].)
Start this server up. By default, Sinatra starts on port `4567`, so you'll want
to configure ngrok to start listening for that, too.
to configure `ngrok` to start listening for that, too.
In order for this server to work, we'll need to set a repository up with a webhook.
The webhook should be configured to fire whenever a Pull Request is created, or merged.
Go ahead and create a repository you're comfortable playing around in. Might we
suggest [@octocat's Spoon/Knife repository](https://github.com/octocat/Spoon-Knife)?
After that, you'll create a new webhook in your repository, feeding it the URL
that ngrok gave you, and choosing `application/x-www-form-urlencoded` as the
that `ngrok` gave you, and choosing `application/x-www-form-urlencoded` as the
content type:
![A new ngrok URL](/assets/images/webhook_sample_url.png)

View File

@@ -1,6 +1,6 @@
---
title: 交付部署
intro: 使用部署 REST API您可以构建与您的服务器和第三方应用程序交互的自定义工具。
title: Delivering deployments
intro: 'Using the Deployments REST API, you can build custom tooling that interacts with your server and a third-party app.'
redirect_from:
- /guides/delivering-deployments
- /guides/automating-deployments-to-integrators
@@ -12,32 +12,45 @@ versions:
ghec: '*'
topics:
- API
ms.openlocfilehash: 60ef610d4134eaddee3f40c5d50d72e463fedd27
ms.sourcegitcommit: fb047f9450b41b24afc43d9512a5db2a2b750a2a
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 09/11/2022
ms.locfileid: '145129063'
---
[部署 API][deploy API] 让 {% data variables.product.product_name %} 上托管的项目能够在你所拥有的服务器上启动这些部署。 结合 [状态 API][status API],你将能够在代码登陆默认分支的那一刻协调部署。
本指南将使用该 API 来演示您可以使用的设置。
在我们的场景中,我们将:
The [Deployments API][deploy API] provides your projects hosted on {% data variables.product.product_name %} with
the capability to launch them on a server that you own. Combined with
[the Status API][status API], you'll be able to coordinate your deployments
the moment your code lands on the default branch.
* 合并拉取请求.
* 在 CI 完成后,我们将相应地设置拉取请求的状态。
* 合并拉取请求后,我们将在服务器上运行部署。
This guide will use that API to demonstrate a setup that you can use.
In our scenario, we will:
我们的 CI 系统和主机服务器将是我们想象中的虚拟物。 它们可能是 Heroku、Amazon 或其他完全不同的东西。 本指南的重点是设置和配置负责管理通信的服务器。
* Merge a pull request.
* When the CI is finished, we'll set the pull request's status accordingly.
* When the pull request is merged, we'll run our deployment to our server.
如果尚未下载,请务必[下载 ngrok][ngrok],并了解如何[使用它][using ngrok]。 我们发现它在暴露本地连接方面是一款非常有用的工具。
Our CI system and host server will be figments of our imagination. They could be
Heroku, Amazon, or something else entirely. The crux of this guide will be setting up
and configuring the server managing the communication.
注意:可以在 [platform-samples][platform samples] 存储库中下载此项目的完整源代码。
If you haven't already, be sure to [download `ngrok`][ngrok], and learn how
to [use it][using ngrok]. We find it to be a very useful tool for exposing local
applications to the internet.
## 编写服务器
{% ifversion cli-webhook-forwarding %}
{% note %}
我们将编写一个快速的 Sinatra 应用程序,以证明我们的本地连接工作正常。
首先编写以下代码:
**Note:** Alternatively, you can use webhook forwarding to set up your local environment to receive webhooks. For more information, see "[Receiving webhooks with the GitHub CLI](/developers/webhooks-and-events/webhooks/receiving-webhooks-with-the-github-cli)."
{% endnote %}
{% endif %}
Note: you can download the complete source code for this project
[from the platform-samples repo][platform samples].
## Writing your server
We'll write a quick Sinatra app to prove that our local connections are working.
Let's start with this:
``` ruby
require 'sinatra'
@@ -49,25 +62,31 @@ post '/event_handler' do
end
```
(如果你不熟悉 Sinatra 的工作原理,建议你阅读 [Sinatra 指南][Sinatra]。)
(If you're unfamiliar with how Sinatra works, we recommend [reading the Sinatra guide][Sinatra].)
启动此服务器。 默认情况下Sinatra 在端口 `4567` 上启动,因此你还需要配置 ngrok 开始监听。
Start this server up. By default, Sinatra starts on port `4567`, so you'll want
to configure `ngrok` to start listening for that, too.
为了使此服务器正常工作,我们需要使用 web 挂钩来设置一个仓库。
Web 挂钩应配置为在创建或合并拉取请求时触发。
继续创建一个您可以自由支配的仓库。 我们可以推荐 [@octocat 的 Spoon/Knife 存储库](https://github.com/octocat/Spoon-Knife)吗?
之后,你将在自己的存储库中创建新的 web 挂钩,向其馈送 ngrok 给你的 URL并选择 `application/x-www-form-urlencoded` 作为内容类型:
In order for this server to work, we'll need to set a repository up with a webhook.
The webhook should be configured to fire whenever a pull request is created, or merged.
Go ahead and create a repository you're comfortable playing around in. Might we
suggest [@octocat's Spoon/Knife repository](https://github.com/octocat/Spoon-Knife)?
After that, you'll create a new webhook in your repository, feeding it the URL
that `ngrok` gave you, and choosing `application/x-www-form-urlencoded` as the
content type:
![新的 ngrok URL](/assets/images/webhook_sample_url.png)
![A new ngrok URL](/assets/images/webhook_sample_url.png)
单击“更新 Webhook”。 应该会看到响应 `Well, it worked!`
很好! 单击“让我选择单个事件”,然后选择以下项:
Click **Update webhook**. You should see a body response of `Well, it worked!`.
Great! Click on **Let me select individual events.**, and select the following:
* 部署
* 部署状态
* 拉取请求
* Deployment
* Deployment status
* Pull Request
在发生相关操作时,{% data variables.product.product_name %} 会将这些事件发送到我们的服务器。 我们将服务器配置为刚好在立即合并拉取请求时处理:
These are the events {% data variables.product.product_name %} will send to our server whenever the relevant action
occurs. We'll configure our server to *just* handle when pull requests are merged
right now:
``` ruby
post '/event_handler' do
@@ -82,15 +101,20 @@ post '/event_handler' do
end
```
这是怎么回事? {% data variables.product.product_name %} 发送的每个事件都附有 `X-GitHub-Event` HTTP 标头。 我们现在只关注拉取请求事件。 当合并拉取请求(其状态为 `closed``merged``true`)时,我们将启动部署。
What's going on? Every event that {% data variables.product.product_name %} sends out attached a `X-GitHub-Event`
HTTP header. We'll only care about the PR events for now. When a pull request is
merged (its state is `closed`, and `merged` is `true`), we'll kick off a deployment.
要测试此概念验证,请在测试存储库的分支中进行一些更改,打开拉取请求,然后合并它。 您的服务器应该会做出相应的响应!
To test out this proof-of-concept, make some changes in a branch in your test
repository, open a pull request, and merge it. Your server should respond accordingly!
## 处理部署
## Working with deployments
服务器已就位,代码在接受审查,拉取请求已合并,现在我们需要部署项目。
With our server in place, the code being reviewed, and our pull request
merged, we want our project to be deployed.
我们将首先修改事件侦听器,以便在拉取请求被合并时对其进行处理,并开始关注部署:
We'll start by modifying our event listener to process pull requests when they're
merged, and start paying attention to deployments:
``` ruby
when "pull_request"
@@ -104,7 +128,8 @@ when "deployment_status"
end
```
根据拉取请求中的信息,我们将首先填写 `start_deployment` 方法:
Based on the information from the pull request, we'll start by filling out the
`start_deployment` method:
``` ruby
def start_deployment(pull_request)
@@ -114,13 +139,19 @@ def start_deployment(pull_request)
end
```
部署可以附加一些元数据,格式为 `payload``description`。 尽管这些值是可选的,但对用于记录和表示信息很有帮助。
Deployments can have some metadata attached to them, in the form of a `payload`
and a `description`. Although these values are optional, it's helpful to use
for logging and representing information.
创建新部署时,将触发完全独立的事件。 这就是为什么我们在 `deployment` 的事件处理程序中有一个新的 `switch` 案例。 在触发部署时,你可以根据此信息得到通知。
When a new deployment is created, a completely separate event is triggered. That's
why we have a new `switch` case in the event handler for `deployment`. You can
use this information to be notified when a deployment has been triggered.
部署可能需要很长时间,因此我们需要侦听各种事件,例如部署的创建时间以及部署所处的状态。
Deployments can take a rather long time, so we'll want to listen for various events,
such as when the deployment was created, and what state it's in.
让我们模拟一个能够完成某些工作的部署,并注意它对输出的影响。 首先,让我们完成 `process_deployment` 方法:
Let's simulate a deployment that does some work, and notice the effect it has on
the output. First, let's complete our `process_deployment` method:
``` ruby
def process_deployment
@@ -134,7 +165,7 @@ def process_deployment
end
```
最后,我们将模拟将状态信息存储为控制台输出:
Finally, we'll simulate storing the status information as console output:
``` ruby
def update_deployment_status
@@ -142,21 +173,27 @@ def update_deployment_status
end
```
我们来分析一下发生了什么。 `start_deployment` 会创建一个新部署,这会触发 `deployment` 事件。 从那里,我们将调用 `process_deployment` 模拟正在进行的工作。 在该处理过程中,我们还会调用 `create_deployment_status`,这样接收方就可以知道发生了什么情况,因为我们将状态切换为 `pending`
Let's break down what's going on. A new deployment is created by `start_deployment`,
which triggers the `deployment` event. From there, we call `process_deployment`
to simulate work that's going on. During that processing, we also make a call to
`create_deployment_status`, which lets a receiver know what's going on, as we
switch the status to `pending`.
部署完成后,我们将状态设置为 `success`
After the deployment is finished, we set the status to `success`.
## 结束语
## Conclusion
GitHub,我们多年来使用 [Heaven][heaven] 版本管理部署。 共同流程本质上与我们上面构建的服务器基本相同:
At GitHub, we've used a version of [Heaven][heaven] to manage
our deployments for years. A common flow is essentially the same as the
server we've built above:
* 等待 CI 检查状态的响应(成功或失败)
* 如果所需的检查成功,则合并拉取请求
* Heaven 提取合并的代码,并将其部署到暂存和生产服务器上
* 与此同时Heaven 也会通过会议室中的 [Hubot][hubot] 会议向每个人通知构建情况
* Wait for a response on the state of the CI checks (success or failure)
* If the required checks succeed, merge the pull request
* Heaven takes the merged code, and deploys it to staging and production servers
* In the meantime, Heaven also notifies everyone about the build, via [Hubot][hubot] sitting in our chat rooms
就这么简单! 使用此示例并不需要构建自己的部署设置。
始终可以依赖 [GitHub 集成][integrations]
That's it! You don't need to build your own deployment setup to use this example.
You can always rely on [GitHub integrations][integrations].
[deploy API]: /rest/reference/repos#deployments
[status API]: /guides/building-a-ci-server

View File

@@ -1,13 +0,0 @@
---
ms.openlocfilehash: 993a49348ec6d3041377512d70efa3d192cbb4d0
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 09/05/2022
ms.locfileid: "145098510"
---
{% warning %}
**警告:** 唯一支持的 S3 存储提供商是 Amazon S3 和适用于 NAS 的 MinIO 网关。 不支持其他 S3 API 兼容的存储提供商。 有关支持的存储提供商的详细信息,请参阅“[适用于 GitHub Enterprise 服务器的 GitHub Actions 入门](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server#external-storage-requirements)”。
{% endwarning %}

View File

@@ -0,0 +1,25 @@
---
ms.openlocfilehash: 00f63e08cc047ce722f7a7172783c07e12344a87
ms.sourcegitcommit: d0cea547f6a5d991a28c310257cafd616235889f
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 11/01/2022
ms.locfileid: "148120915"
---
在此示例中Ubuntu 16 核心运行器已添加到名为 `ubuntu-runners` 的组中。 `runs-on` 键将作业发送到 `ubuntu-runners` 组中的任何可用运行器:
```yaml
name: learn-github-actions
on: [push]
jobs:
check-bats-version:
runs-on:
group: ubuntu-runners
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '14'
- run: npm install -g bats
- run: bats -v
```

View File

@@ -0,0 +1,28 @@
---
ms.openlocfilehash: 718f58c2013f7deda31fd2a300a5a2b3f7e4b5ec
ms.sourcegitcommit: d0cea547f6a5d991a28c310257cafd616235889f
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 11/01/2022
ms.locfileid: "148120910"
---
组合组和标签时,运行器必须满足这两项要求才能运行作业。
在此示例中,名为 `ubuntu-runners` 的运行器组使用 Ubuntu 16 核心运行器(分配了标签 `ubuntu-20.04-16core`)进行填充。 `runs-on` 键将 `group``labels` 组合在一起,以便将作业路由到具有匹配标签的组内的任何可用运行器:
```yaml
name: learn-github-actions
on: [push]
jobs:
check-bats-version:
runs-on:
group: ubuntu-runners
labels: ubuntu-20.04-16core
steps:
- uses: {% data reusables.actions.action-checkout %}
- uses: {% data reusables.actions.action-setup-node %}
with:
node-version: '14'
- run: npm install -g bats
- run: bats -v
```

View File

@@ -1,60 +1,66 @@
Use `jobs.<job_id>.runs-on` to define the type of machine to run the job on.
---
ms.openlocfilehash: 89c3ed1592c000322cf4f0d6915e355bc81014ed
ms.sourcegitcommit: d0cea547f6a5d991a28c310257cafd616235889f
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 11/01/2022
ms.locfileid: "148120914"
---
使用 `jobs.<job_id>.runs-on` 定义要运行作业的计算机类型。
{% ifversion fpt or ghec %}- The destination machine can be either a [{% data variables.product.prodname_dotcom %}-hosted runner](#choosing-github-hosted-runners), [{% data variables.actions.hosted_runner %}](#choosing-runners-in-a-group), or a [self-hosted runner](#choosing-self-hosted-runners).{% else %}
- The destination machine can be a [self-hosted runner](#choosing-self-hosted-runners).{% endif %}
{% ifversion target-runner-groups %}- You can target runners based on the labels assigned to them, or their group membership, or a combination of these.{% else %}
- You can target runners based on the labels assigned to them.{% endif %}
- You can provide `runs-on` as a single string or as an array of strings.
- If you specify an array of strings, your workflow will execute on any runner that matches all of the specified `runs-on` values.
- If you would like to run your workflow on multiple machines, use [`jobs.<job_id>.strategy`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategy).
{% ifversion fpt or ghec %}- 目标计算机可以是 [{% data variables.product.prodname_dotcom %} 托管的运行器](#choosing-github-hosted-runners)[{% data variables.actions.hosted_runner %}](#choosing-runners-in-a-group) 或 [自托管运行器](#choosing-self-hosted-runners){% else %}
- 目标计算机可以是[运行器](#choosing-self-hosted-runners){% endif %} {% ifversion target-runner-groups %}- 你可以根据分配给运行器的标签、其组成员身份或两者的组合来定位运行器。{% else %}
- 可以根据分配给运行器的标签来定位运行器。{% endif %}
- 可以将 `runs-on` 作为单个字符串或字符串数组提供。
- 如果指定字符串数组,工作流将在与所有指定 `runs-on` 值匹配的任何运行器上执行。
- 如果要在多台计算机上运行工作流,请使用 [`jobs.<job_id>.strategy`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategy)。
{% ifversion fpt or ghec or ghes %}
{% data reusables.actions.enterprise-github-hosted-runners %}
{% ifversion fpt or ghec or ghes %} {% data reusables.actions.enterprise-github-hosted-runners %}
### Choosing {% data variables.product.prodname_dotcom %}-hosted runners
### 选择 {% data variables.product.prodname_dotcom %} 托管的运行器
If you use a {% data variables.product.prodname_dotcom %}-hosted runner, each job runs in a fresh instance of a runner image specified by `runs-on`.
如果使用 {% data variables.product.prodname_dotcom %} 托管的运行器,每个作业将在 `runs-on` 指定的运行器映像的新实例中运行。
Available {% data variables.product.prodname_dotcom %}-hosted runner types are:
可用的 {% data variables.product.prodname_dotcom %} 托管的运行器类型包括:
{% data reusables.actions.supported-github-runners %}
#### Example: Specifying an operating system
#### 示例:指定操作系统
```yaml
runs-on: ubuntu-latest
```
For more information, see "[About {% data variables.product.prodname_dotcom %}-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners)."
有关详细信息,请参阅“[关于 {% data variables.product.prodname_dotcom %} 托管的运行器](/actions/using-github-hosted-runners/about-github-hosted-runners)”。
{% endif %}
{% ifversion fpt or ghec or ghes %}
### Choosing self-hosted runners
### 选择自托管运行器
{% endif %}
{% data reusables.actions.self-hosted-runner-labels-runs-on %}
#### Example: Using labels for runner selection
#### 示例:使用标签进行运行器选择
```yaml
runs-on: [self-hosted, linux]
```
For more information, see "[About self-hosted runners](/github/automating-your-workflow-with-github-actions/about-self-hosted-runners)" and "[Using self-hosted runners in a workflow](/github/automating-your-workflow-with-github-actions/using-self-hosted-runners-in-a-workflow)."
有关详细信息,请参阅“[关于自托管运行器](/github/automating-your-workflow-with-github-actions/about-self-hosted-runners)”和“[在工作流中使用自托管运行器](/github/automating-your-workflow-with-github-actions/using-self-hosted-runners-in-a-workflow)”。
{% ifversion target-runner-groups %}
### Choosing runners in a group
### 在组中选择运行器
You can use `runs-on` to target runner groups, so that the job will execute on any runner that is a member of that group. For more granular control, you can also combine runner groups with labels.
可以使用 `runs-on` 定位运行器组,以便作业将在属于该组的任何运行器上执行。 若要进行更精细的控制,还可以将运行器组与标签组合在一起。
Runner groups can only have [{% data variables.actions.hosted_runner %}s](/actions/using-github-hosted-runners/using-larger-runners) or [self-hosted runners](/actions/hosting-your-own-runners) as members.
运行器组只能将 [{% data variables.actions.hosted_runner %}](/actions/using-github-hosted-runners/using-larger-runners) 或[自托管运行器](/actions/hosting-your-own-runners)作为成员。
#### Example: Using groups to control where jobs are run
#### 示例:使用组控制作业的运行位置
{% data reusables.actions.jobs.example-runs-on-groups %}
#### Example: Combining groups and labels
#### 示例:组合组和标签
{% data reusables.actions.jobs.example-runs-on-labels-and-groups %}

View File

@@ -0,0 +1,42 @@
---
ms.openlocfilehash: ec6ab3ed5541819ee7578b34ce61fc11de31b51f
ms.sourcegitcommit: d0cea547f6a5d991a28c310257cafd616235889f
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 11/01/2022
ms.locfileid: "148120904"
---
{% ifversion target-runner-groups %}{% ifversion ghec or ghae or ghes %}
## 对运行器组使用唯一名称
{% data variables.product.prodname_actions %} 要求运行器组名称在组织级别必须唯一。 这意味着组织将无法再创建与企业中的运行器组同名的运行器组。 此外,用户将在与企业中的组共享相同名称的任何运行器组上看到警告横幅,建议重命名组织组。
为了避免混淆,如果组织和企业中存在重复的运行器组,工作流将失败。 若要解决此问题,可以重命名组织或企业中的某个运行器组,也可以更新工作流文件以向运行器组名称添加前缀:
- `org/``organization/`
- `ent/``enterprise/`
### 示例:使用前缀区分运行器组
例如,如果组织中有一个名为 `my-group` 的运行器组,企业中有另一个名为 `my-group` 的运行器组,则可以更新工作流文件以使用 `org/my-group``ent/my-group` 来区分这两者。
使用 `org/`
```yaml
runs-on:
group: org/my-group
labels: [ self-hosted, label-1 ]
```
使用 `ent/`
```yaml
runs-on:
group: ent/my-group
labels: [ self-hosted, label-1 ]
```
{% endif %}
{% endif %}

View File

@@ -0,0 +1,9 @@
---
ms.openlocfilehash: 520bbbec14311803d1c62f528f7be9d21f68d9ff
ms.sourcegitcommit: ca040a1871ab5e929b596686ef955b02c5afa051
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 11/02/2022
ms.locfileid: "148130990"
---
自定义存储库角色是一组可配置的权限,具有您选择的自定义名称。

View File

@@ -0,0 +1,13 @@
---
ms.openlocfilehash: 5138879c90e5348928436f9ea7ab6c302c9735d1
ms.sourcegitcommit: ca040a1871ab5e929b596686ef955b02c5afa051
ms.translationtype: HT
ms.contentlocale: zh-CN
ms.lasthandoff: 11/02/2022
ms.locfileid: "148130993"
---
{% ifversion ghec %} {% note %}
注意:只有使用 {% data variables.product.prodname_ghe_cloud %} 的组织才能创建自定义存储库角色。 {% data reusables.enterprise.link-to-ghec-trial %}
{% endnote %} {% endif %}

View File

@@ -49,6 +49,10 @@ Google | Google Cloud Storage Service Account Access Key ID with Google Cloud St
Google | Google Cloud Storage User Access Key ID with Google Cloud Storage Access Key Secret | google_cloud_storage_user_access_key_id </br>google_cloud_storage_access_key_secret
Google | Google OAuth Client ID with Google OAuth Client Secret | google_oauth_client_id </br>google_oauth_client_secret
Grafana | Grafana API Key | grafana_api_key
{%- ifversion fpt or ghec or ghes > 3.8 or ghae > 3.8 %}
HashiCorp | HashiCorp Vault Batch Token (v1.10.0+) | hashicorp_vault_batch_token
HashiCorp | HashiCorp Vault Root Service Token (v1.10.0+) | hashicorp_vault_root_service_token
HashiCorp | HashiCorp Vault Service Token (v1.10.0+) | hashicorp_vault_service_token{% endif %}
Hubspot | Hubspot API Key | hubspot_api_key
Intercom | Intercom Access Token | intercom_access_token
{%- ifversion fpt or ghec or ghes > 3.6 or ghae > 3.6 %}