1
0
mirror of synced 2026-01-10 09:02:35 -05:00

New translation batch for cn (#23371)

* 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-known-broken-translation-files.js

* Check in cn CSV report

Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
This commit is contained in:
docubot
2021-12-03 17:30:55 -06:00
committed by GitHub
parent ddd14479c5
commit b76e8a8333
30 changed files with 795 additions and 723 deletions

View File

@@ -16,6 +16,7 @@ translations/zh-CN/content/actions/automating-builds-and-tests/building-and-test
translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-python.md,rendering error
translations/zh-CN/content/actions/creating-actions/creating-a-javascript-action.md,rendering error
translations/zh-CN/content/actions/creating-actions/metadata-syntax-for-github-actions.md,rendering error
translations/zh-CN/content/actions/creating-actions/releasing-and-maintaining-actions.md,rendering error
translations/zh-CN/content/actions/deployment/about-deployments/index.md,rendering error
translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/index.md,rendering error
translations/zh-CN/content/actions/deployment/managing-your-deployments/index.md,rendering error
@@ -24,10 +25,12 @@ translations/zh-CN/content/actions/deployment/security-hardening-your-deployment
translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform.md,rendering error
translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/index.md,rendering error
translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/using-openid-connect-with-reusable-workflows.md,rendering error
translations/zh-CN/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md,rendering error
translations/zh-CN/content/actions/guides.md,rendering error
translations/zh-CN/content/actions/hosting-your-own-runners/about-self-hosted-runners.md,rendering error
translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md,Listed in localization-support#489
translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md,rendering error
translations/zh-CN/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md,rendering error
translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md,Listed in localization-support#489
translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md,rendering error
translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md,rendering error
@@ -152,9 +155,11 @@ translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scannin
translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system.md,rendering error
translations/zh-CN/content/code-security/getting-started/github-security-features.md,rendering error
translations/zh-CN/content/code-security/getting-started/securing-your-organization.md,rendering error
translations/zh-CN/content/code-security/guides.md,rendering error
translations/zh-CN/content/code-security/secret-scanning/about-secret-scanning.md,rendering error
translations/zh-CN/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md,rendering error
translations/zh-CN/content/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning.md,rendering error
translations/zh-CN/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md,rendering error
translations/zh-CN/content/code-security/security-overview/about-the-security-overview.md,rendering error
translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions.md,rendering error
translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot.md,rendering error
@@ -185,6 +190,7 @@ translations/zh-CN/content/codespaces/developing-in-codespaces/developing-in-a-c
translations/zh-CN/content/codespaces/developing-in-codespaces/index.md,rendering error
translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code.md,rendering error
translations/zh-CN/content/codespaces/developing-in-codespaces/using-source-control-in-your-codespace.md,rendering error
translations/zh-CN/content/codespaces/guides.md,rendering error
translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization.md,rendering error
translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md,rendering error
translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces.md,rendering error
@@ -212,12 +218,14 @@ translations/zh-CN/content/developers/apps/building-oauth-apps/scopes-for-oauth-
translations/zh-CN/content/developers/apps/getting-started-with-apps/about-apps.md,rendering error
translations/zh-CN/content/developers/apps/getting-started-with-apps/activating-optional-features-for-apps.md,rendering error
translations/zh-CN/content/developers/apps/getting-started-with-apps/migrating-oauth-apps-to-github-apps.md,rendering error
translations/zh-CN/content/developers/apps/guides/using-content-attachments.md,rendering error
translations/zh-CN/content/developers/github-marketplace/github-marketplace-overview/about-github-marketplace.md,rendering error
translations/zh-CN/content/developers/github-marketplace/github-marketplace-overview/index.md,rendering error
translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-new-purchases-and-free-trials.md,rendering error
translations/zh-CN/content/developers/overview/managing-deploy-keys.md,rendering error
translations/zh-CN/content/developers/overview/secret-scanning-partner-program.md,rendering error
translations/zh-CN/content/developers/webhooks-and-events/webhooks/about-webhooks.md,rendering error
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/about-discussions.md,rendering error
translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md,rendering error
translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-github-campus-program.md,rendering error
@@ -250,6 +258,7 @@ translations/zh-CN/content/github/writing-on-github/working-with-advanced-format
translations/zh-CN/content/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md,rendering error
translations/zh-CN/content/graphql/guides/index.md,rendering error
translations/zh-CN/content/graphql/guides/migrating-graphql-global-node-ids.md,rendering error
translations/zh-CN/content/issues/guides.md,rendering error
translations/zh-CN/content/issues/trying-out-the-new-projects-experience/customizing-your-project-views.md,rendering error
translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-access-to-projects.md,rendering error
translations/zh-CN/content/issues/using-labels-and-milestones-to-track-work/managing-labels.md,rendering error
@@ -331,6 +340,7 @@ translations/zh-CN/content/search-github/searching-on-github/searching-discussio
translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md,rendering error
translations/zh-CN/content/search-github/searching-on-github/searching-issues-and-pull-requests.md,rendering error
translations/zh-CN/content/sponsors/getting-started-with-github-sponsors/about-github-sponsors.md,rendering error
translations/zh-CN/content/sponsors/guides.md,rendering error
translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/about-github-sponsors-for-open-source-contributors.md,rendering error
translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml,Listed in localization-support#489
translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml,Listed in localization-support#489
1 file reason
16 translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-python.md rendering error
17 translations/zh-CN/content/actions/creating-actions/creating-a-javascript-action.md rendering error
18 translations/zh-CN/content/actions/creating-actions/metadata-syntax-for-github-actions.md rendering error
19 translations/zh-CN/content/actions/creating-actions/releasing-and-maintaining-actions.md rendering error
20 translations/zh-CN/content/actions/deployment/about-deployments/index.md rendering error
21 translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/index.md rendering error
22 translations/zh-CN/content/actions/deployment/managing-your-deployments/index.md rendering error
25 translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform.md rendering error
26 translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/index.md rendering error
27 translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/using-openid-connect-with-reusable-workflows.md rendering error
28 translations/zh-CN/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md rendering error
29 translations/zh-CN/content/actions/guides.md rendering error
30 translations/zh-CN/content/actions/hosting-your-own-runners/about-self-hosted-runners.md rendering error
31 translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md Listed in localization-support#489
32 translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md rendering error
33 translations/zh-CN/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md rendering error
34 translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md Listed in localization-support#489
35 translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md rendering error
36 translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md rendering error
155 translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system.md rendering error
156 translations/zh-CN/content/code-security/getting-started/github-security-features.md rendering error
157 translations/zh-CN/content/code-security/getting-started/securing-your-organization.md rendering error
158 translations/zh-CN/content/code-security/guides.md rendering error
159 translations/zh-CN/content/code-security/secret-scanning/about-secret-scanning.md rendering error
160 translations/zh-CN/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md rendering error
161 translations/zh-CN/content/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning.md rendering error
162 translations/zh-CN/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md rendering error
163 translations/zh-CN/content/code-security/security-overview/about-the-security-overview.md rendering error
164 translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions.md rendering error
165 translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot.md rendering error
190 translations/zh-CN/content/codespaces/developing-in-codespaces/index.md rendering error
191 translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code.md rendering error
192 translations/zh-CN/content/codespaces/developing-in-codespaces/using-source-control-in-your-codespace.md rendering error
193 translations/zh-CN/content/codespaces/guides.md rendering error
194 translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization.md rendering error
195 translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md rendering error
196 translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces.md rendering error
218 translations/zh-CN/content/developers/apps/getting-started-with-apps/about-apps.md rendering error
219 translations/zh-CN/content/developers/apps/getting-started-with-apps/activating-optional-features-for-apps.md rendering error
220 translations/zh-CN/content/developers/apps/getting-started-with-apps/migrating-oauth-apps-to-github-apps.md rendering error
221 translations/zh-CN/content/developers/apps/guides/using-content-attachments.md rendering error
222 translations/zh-CN/content/developers/github-marketplace/github-marketplace-overview/about-github-marketplace.md rendering error
223 translations/zh-CN/content/developers/github-marketplace/github-marketplace-overview/index.md rendering error
224 translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-new-purchases-and-free-trials.md rendering error
225 translations/zh-CN/content/developers/overview/managing-deploy-keys.md rendering error
226 translations/zh-CN/content/developers/overview/secret-scanning-partner-program.md rendering error
227 translations/zh-CN/content/developers/webhooks-and-events/webhooks/about-webhooks.md rendering error
228 translations/zh-CN/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md rendering error
229 translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/about-discussions.md rendering error
230 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md rendering error
231 translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-github-campus-program.md rendering error
258 translations/zh-CN/content/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md rendering error
259 translations/zh-CN/content/graphql/guides/index.md rendering error
260 translations/zh-CN/content/graphql/guides/migrating-graphql-global-node-ids.md rendering error
261 translations/zh-CN/content/issues/guides.md rendering error
262 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/customizing-your-project-views.md rendering error
263 translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-access-to-projects.md rendering error
264 translations/zh-CN/content/issues/using-labels-and-milestones-to-track-work/managing-labels.md rendering error
340 translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md rendering error
341 translations/zh-CN/content/search-github/searching-on-github/searching-issues-and-pull-requests.md rendering error
342 translations/zh-CN/content/sponsors/getting-started-with-github-sponsors/about-github-sponsors.md rendering error
343 translations/zh-CN/content/sponsors/guides.md rendering error
344 translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/about-github-sponsors-for-open-source-contributors.md rendering error
345 translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml Listed in localization-support#489
346 translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml Listed in localization-support#489

View File

@@ -9,6 +9,7 @@ topics:
- Community
versions:
fpt: '*'
ghec: '*'
ghes: '*'
ghae: '*'
---
@@ -16,7 +17,7 @@ versions:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}
## 简介
## Introduction
After you create an action, you'll want to continue releasing new features while working with community contributions. This tutorial describes an example process you can follow to release and maintain actions in open source. The example:
@@ -37,7 +38,7 @@ JavaScript actions are Node.js repositories with metadata. However, JavaScript a
* Dependent packages are committed alongside the code, typically in a compiled and minified form. This means that automated builds and secure community contributions are important.
{% ifversion fpt %}
{% ifversion fpt or ghec %}
* Tagged releases can be published directly to {% data variables.product.prodname_marketplace %} and consumed by workflows across {% data variables.product.prodname_dotcom %}.
@@ -54,7 +55,7 @@ To support the developer process in the next section, add two {% data variables.
### Example developer process
Here is an example process that you can follow to automatically run tests, create a release{% ifversion fpt%} and publish to {% data variables.product.prodname_marketplace %}{% endif %}, and publish your action.
Here is an example process that you can follow to automatically run tests, create a release{% ifversion fpt or ghec%} and publish to {% data variables.product.prodname_marketplace %}{% endif %}, and publish your action.
1. Do feature work in branches per GitHub flow. For more information, see "[GitHub flow](/get-started/quickstart/github-flow)."
* Whenever a commit is pushed to the feature branch, your testing workflow will automatically run the tests.
@@ -65,13 +66,13 @@ Here is an example process that you can follow to automatically run tests, creat
* **Note:** for security reasons, workflows triggered by `pull_request` from forks have restricted `GITHUB_TOKEN` permissions and do not have access to secrets. If your tests or other workflows triggered upon pull request require access to secrets, consider using a different event like a [manual trigger](/actions/reference/events-that-trigger-workflows#manual-events) or a [`pull_request_target`](/actions/reference/events-that-trigger-workflows#pull_request_target). Read more [here](/actions/reference/events-that-trigger-workflows#pull-request-events-for-forked-repositories).
3. Create a semantically tagged release. {% ifversion fpt %} You may also publish to {% data variables.product.prodname_marketplace %} with a simple checkbox. {% endif %} For more information, see "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release)"{% ifversion fpt %} and "[Publishing actions in {% data variables.product.prodname_marketplace %}](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)"{% endif %}.
3. Create a semantically tagged release. {% ifversion fpt or ghec %} You may also publish to {% data variables.product.prodname_marketplace %} with a simple checkbox. {% endif %} For more information, see "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release)"{% ifversion fpt or ghec %} and "[Publishing actions in {% data variables.product.prodname_marketplace %}](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)"{% endif %}.
* When a release is published or edited, your release workflow will automatically take care of compilation and adjusting tags.
* We recommend creating releases using semantically versioned tags for example, `v1.1.3` and keeping major (`v1`) and minor (`v1.1`) tags current to the latest appropriate commit. For more information, see "[About custom actions](/actions/creating-actions/about-custom-actions#using-release-management-for-actions)" and "[About semantic versioning](https://docs.npmjs.com/about-semantic-versioning).
### 结果
### Results
Unlike some other automated release management strategies, this process intentionally does not commit dependencies to the `main` branch, only to the tagged release commits. By doing so, you encourage users of your action to reference named tags or `sha`s, and you help ensure the security of third party pull requests by doing the build yourself during a release.
@@ -81,12 +82,12 @@ Using semantic releases means that the users of your actions can pin their workf
{% data variables.product.product_name %} provides tools and guides to help you work with the open source community. Here are a few tools we recommend setting up for healthy bidirectional communication. By providing the following signals to the community, you encourage others to use, modify, and contribute to your action:
* Maintain a `README` with plenty of usage examples and guidance. 更多信息请参阅“[关于自述文件](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes)”。
* Include a workflow status badge in your `README` file. 更多信息请参阅“[添加工作流程状态徽章](/actions/managing-workflow-runs/adding-a-workflow-status-badge)”。 Also visit [shields.io](https://shields.io/) to learn about other badges that you can add.{% ifversion fpt %}
* Maintain a `README` with plenty of usage examples and guidance. For more information, see "[About READMEs](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes)."
* Include a workflow status badge in your `README` file. For more information, see "[Adding a workflow status badge](/actions/managing-workflow-runs/adding-a-workflow-status-badge)." Also visit [shields.io](https://shields.io/) to learn about other badges that you can add.{% ifversion fpt or ghec %}
* Add community health files like `CODE_OF_CONDUCT`, `CONTRIBUTING`, and `SECURITY`. For more information, see "[Creating a default community health file](/github/building-a-strong-community/creating-a-default-community-health-file#supported-file-types)."{% endif %}
* Keep issues current by utilizing actions like [actions/stale](https://github.com/actions/stale).
## 延伸阅读
## Further reading
Examples where similar patterns are employed include:

View File

@@ -1,7 +1,7 @@
---
title: Using environments for deployment
shortTitle: Use environments for deployment
intro: 您可以使用保护规则和机密配置环境。 A workflow job that references an environment must follow any protection rules for the environment before running or accessing the environment's secrets.
intro: You can configure environments with protection rules and secrets. A workflow job that references an environment must follow any protection rules for the environment before running or accessing the environment's secrets.
product: '{% data reusables.gated-features.environments %}'
miniTocMaxHeadingLevel: 3
redirect_from:
@@ -17,56 +17,58 @@ versions:
{% data reusables.actions.ae-beta %}
## 关于环境
## About environments
Environments are used to describe a general deployment target like `production`, `staging`, or `development`. When a {% data variables.product.prodname_actions %} workflow deploys to an environment, the environment is displayed on the main page of the repository. For more information about viewing deployments to environments, see "[Viewing deployment history](/developers/overview/viewing-deployment-history)."
您可以使用保护规则和机密配置环境。 当工作流程引用环境时,作业在环境的所有保护规则通过之前不会开始。 在所有环境保护规则通过之前,作业也不能访问在环境中定义的机密。
You can configure environments with protection rules and secrets. When a workflow job references an environment, the job won't start until all of the environment's protection rules pass. A job also cannot access secrets that are defined in an environment until all the environment protection rules pass.
{% ifversion fpt %}
{% note %}
**Note:** If you don't use {% data variables.product.prodname_ghe_cloud %} and convert a repository from public to private, any configured protection rules or environment secrets will be ignored, and you will not be able to configure any environments. 如果将仓库转换回公共,您将有权访问以前配置的任何保护规则和环境机密。 {% data reusables.enterprise.link-to-ghec-trial %}
**Note:** You can only configure environments for public repositories. If you convert a repository from public to private, any configured protection rules or environment secrets will be ignored, and you will not be able to configure any environments. If you convert your repository back to public, you will have access to any previously configured protection rules and environment secrets.
Organizations that use {% data variables.product.prodname_ghe_cloud %} can configure environments for private repositories. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/deployment/targeting-different-environments/using-environments-for-deployment). {% data reusables.enterprise.link-to-ghec-trial %}
{% endnote %}
{% endif %}
## 环境保护规则
## Environment protection rules
环境保护规则要求通过特定的条件,然后引用环境的作业才能继续。 {% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}您可以使用环境保护规则来要求手动批准、延迟作业或者将环境限于某些分支。{% else %}您可以使用环境保护规则要求手动批准或延迟作业。{% endif %}
Environment protection rules require specific conditions to pass before a job referencing the environment can proceed. {% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}You can use environment protection rules to require a manual approval, delay a job, or restrict the environment to certain branches.{% else %}You can use environment protection rules to require a manual approval or delay a job.{% endif %}
### 需要的审查者
### Required reviewers
使用所需的审查者要求特定人员或团队批准引用环境的工作流程作业。 您最多可以列出六个用户或团队作为审查者。 审查者必须至少具有对仓库的读取访问权限。 只有一个必需的审查者需要批准该作业才能继续。
Use required reviewers to require a specific person or team to approve workflow jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
有关与必需审查者一起审查引用环境的作业的详细信息,请参阅“[审查部署](/actions/managing-workflow-runs/reviewing-deployments)”。
For more information on reviewing jobs that reference an environment with required reviewers, see "[Reviewing deployments](/actions/managing-workflow-runs/reviewing-deployments)."
### 等待计时器
### Wait timer
在最初触发作业后,使用等待计时器将作业延迟特定时间。 时间(分钟)必须是 0 至 43,20030天之间的整数。
Use a wait timer to delay a job for a specific amount of time after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).
{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}
### 部署分支
### Deployment branches
使用部署分支来限制哪些分支可以部署到环境中。 以下是环境部署分支的选项:
Use deployment branches to restrict which branches can deploy to the environment. Below are the options for deployment branches for an environment:
* **All branches(所有分支)**:仓库中的所有分支都可以部署到环境。
* **Protected branches(受保护的分支)**:只有启用分支保护规则的分支才能部署到环境。 如果没有为仓库中的任何分支定义分支保护规则,那么所有分支都可以部署。 有关分支保护规则的更多信息,请参阅“[关于受保护分支](/github/administering-a-repository/about-protected-branches)”。
* **Selected branches(所选分支)**:只有与指定的名称模式匹配的分支才能部署到环境。
* **All branches**: All branches in the repository can deploy to the environment.
* **Protected branches**: Only branches with branch protection rules enabled can deploy to the environment. If no branch protection rules are defined for any branch in the repository, then all branches can deploy. For more information about branch protection rules, see "[About protected branches](/github/administering-a-repository/about-protected-branches)."
* **Selected branches**: Only branches that match your specified name patterns can deploy to the environment.
例如,如果您指定 `releases/*` 为部署分支规则,则只有其名称开头为 `releases/` 的分支才能部署到环境。 (通配符字符将不匹配 `/`。 要匹配以 `release/` 开头并且包含额外单一斜杠的分支,请使用 `release/*/*`)。 如果您添加 `main` 作为部署分支规则,则名为 `main` 的分支也可以部署到环境。 有关部署分支的语法选项的更多信息,请参阅 [Ruby File.fnmatch 文档](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch)
For example, if you specify `releases/*` as a deployment branch rule, only branches whose name begins with `releases/` can deploy to the environment. (Wildcard characters will not match `/`. To match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.) If you add `main` as a deployment branch rule, a branch named `main` can also deploy to the environment. For more information about syntax options for deployment branches, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch).
{% endif %}
## 环境机密
## Environment secrets
存储在环境中的机密仅可用于引用环境的工作流程作业。 如果环境需要批准,作业在所需的审查者批准之前不能访问环境机密。 有关机密的更多信息,请参阅“[加密密码](/actions/reference/encrypted-secrets)”。
Secrets stored in an environment are only available to workflow jobs that reference the environment. If the environment requires approval, a job cannot access environment secrets until one of the required reviewers approves it. For more information about secrets, see "[Encrypted secrets](/actions/reference/encrypted-secrets)."
{% note %}
**注意:** 在自托管运行器上运行的工作流程不会在一个孤立的容器中运行,即使它们使用环境。 Environment secrets should be treated with the same level of security as repository and organization secrets. 更多信息请参阅“[GitHub Actions 的安全性增强](/actions/learn-github-actions/security-hardening-for-github-actions#hardening-for-self-hosted-runners)”。
**Note:** Workflows that run on self-hosted runners are not run in an isolated container, even if they use environments. Environment secrets should be treated with the same level of security as repository and organization secrets. For more information, see "[Security hardening for GitHub Actions](/actions/learn-github-actions/security-hardening-for-github-actions#hardening-for-self-hosted-runners)."
{% endnote %}
## 创建环境
## Creating an environment
{% data reusables.github-actions.permissions-statement-environment %}
@@ -77,7 +79,7 @@ Environments are used to describe a general deployment target like `production`,
{% data reusables.github-actions.name-environment %}
1. Optionally, specify people or teams that must approve workflow jobs that use this environment.
1. Select **Required reviewers**.
1. Enter up to 6 people or teams. 只有一个必需的审查者需要批准该作业才能继续。
1. Enter up to 6 people or teams. Only one of the required reviewers needs to approve the job for it to proceed.
1. Click **Save protection rules**.
2. Optionally, specify the amount of time to wait before allowing workflow jobs that use this environment to proceed.
1. Select **Wait timer**.
@@ -86,37 +88,37 @@ Environments are used to describe a general deployment target like `production`,
3. Optionally, specify what branches can deploy to this environment. For more information about the possible values, see "[Deployment branches](#deployment-branches)."
1. Select the desired option in the **Deployment branches** dropdown.
1. If you chose **Selected branches**, enter the branch name patterns that you want to allow.
4. Optionally, add environment secrets. These secrets are only available to workflow jobs that use the environment. Additionally, workflow jobs that use this environment can only access these secrets after any configured rules (for example, required reviewers) pass. 有关机密的更多信息,请参阅“[加密密码](/actions/reference/encrypted-secrets)”。
4. Optionally, add environment secrets. These secrets are only available to workflow jobs that use the environment. Additionally, workflow jobs that use this environment can only access these secrets after any configured rules (for example, required reviewers) pass. For more information about secrets, see "[Encrypted secrets](/actions/reference/encrypted-secrets)."
1. Under **Environment secrets**, click **Add Secret**.
1. Enter the secret name.
1. Enter the secret value.
1. 单击 **Add secret(添加密码)**
1. Click **Add secret**.
{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}您也可以通过 REST API 创建和配置环境。 更多信息请参阅“[环境](/rest/reference/repos#environments)”和“[密码](/rest/reference/actions#secrets)”。{% endif %}
{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}You can also create and configure environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)" and "[Secrets](/rest/reference/actions#secrets)."{% endif %}
运行引用不存在的环境的工作流程将使用引用的名称创建环境。 新创建的环境将不配置任何保护规则或机密。 可在仓库中编辑工作流程的任何人都可以通过工作流程文件创建环境,但只有仓库管理员才能配置环境。
Running a workflow that references an environment that does not exist will create an environment with the referenced name. The newly created environment will not have any protection rules or secrets configured. Anyone that can edit workflows in the repository can create environments via a workflow file, but only repository admins can configure the environment.
## Using an environment
工作流程中的每个作业都可以引用单个环境。 在将引用环境的作业发送到运行器之前,必须通过为环境配置的任何保护规则。 The job can access the environment's secrets only after the job is sent to a runner.
Each job in a workflow can reference a single environment. Any protection rules configured for the environment must pass before a job referencing the environment is sent to a runner. The job can access the environment's secrets only after the job is sent to a runner.
当工作流程引用环境时,环境将显示在仓库的部署中。 有关查看当前和以前的部署的详细信息,请参阅“[查看部署历史记录](/developers/overview/viewing-deployment-history)”。
When a workflow references an environment, the environment will appear in the repository's deployments. For more information about viewing current and previous deployments, see "[Viewing deployment history](/developers/overview/viewing-deployment-history)."
{% data reusables.actions.environment-example %}
## 删除环境
## Deleting an environment
{% data reusables.github-actions.permissions-statement-environment %}
删除环境将删除与环境关联的所有机密和保护规则。 由于已删除环境的保护规则而正在等待的任何作业将自动失败。
Deleting an environment will delete all secrets and protection rules associated with the environment. Any jobs currently waiting because of protection rules from the deleted environment will automatically fail.
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.github-actions.sidebar-environment %}
1. 在要删除的环境旁边,单击 {% octicon "trash" aria-label="The trash icon" %}
2. 单击 **I understand, delete this environment(我了解,删除此环境)**
1. Next to the environment that you want to delete, click {% octicon "trash" aria-label="The trash icon" %}.
2. Click **I understand, delete this environment**.
{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}您也可以通过 REST API 删除环境。 更多信息请参阅“[环境](/rest/reference/repos#environments)”。{% endif %}
{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}You can also delete environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)."{% endif %}
## How environments relate to deployments
@@ -124,6 +126,6 @@ Environments are used to describe a general deployment target like `production`,
You can access these objects through the REST API or GraphQL API. You can also subscribe to these webhook events. For more information, see "[Repositories](/rest/reference/repos#deployments)" (REST API), "[Objects]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/reference/objects#deployment)" (GraphQL API), or "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment)."
## 后续步骤
## Next steps
{% data variables.product.prodname_actions %} provides several features for managing your deployments. For more information, see "[Deploying with GitHub Actions](/actions/deployment/deploying-with-github-actions)."

View File

@@ -65,3 +65,4 @@ includeGuides:
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
---

View File

@@ -81,11 +81,13 @@ You can add self-hosted runners at the organization level, where they can be use
## Adding a self-hosted runner to an enterprise
You 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 %}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 fpt or ghec %}
{% ifversion ghec %}
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 Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions).
{% data reusables.enterprise-accounts.access-enterprise %}
@@ -104,9 +106,11 @@ To add a self-hosted runner at the enterprise level of {% data variables.product
1. Click **Add new**, then click **New runner**.
{% data reusables.github-actions.self-hosted-runner-configure %}
{% endif %}
{% ifversion ghec or ghae or ghes %}
{% data reusables.github-actions.self-hosted-runner-check-installation-success %}
{% data reusables.github-actions.self-hosted-runner-public-repo-access %}
{% endif %}
### Making enterprise runners available to repositories
@@ -115,3 +119,4 @@ By default, runners in an enterprise's "Default" self-hosted runner group are av
To make an enterprise-level self-hosted runner group available to an organization repository, you might need to change the organization's inherited settings for the runner group to make the runner available to repositories in the organization.
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 %}

View File

@@ -1,6 +1,6 @@
---
title: 使用组管理自托管运行器的访问权限
intro: 您可以使用策略来限制对已添加到组织或企业的自托管运行器的访问。
title: Managing access to self-hosted runners using groups
intro: You can use policies to limit access to self-hosted runners that have been added to an organization or enterprise.
redirect_from:
- /actions/hosting-your-own-runners/managing-access-to-self-hosted-runners
versions:
@@ -9,7 +9,7 @@ versions:
ghae: '*'
ghec: '*'
type: tutorial
shortTitle: 管理运行器组
shortTitle: Manage runner groups
---
{% data reusables.actions.ae-self-hosted-runners-notice %}
@@ -17,42 +17,47 @@ shortTitle: 管理运行器组
{% data reusables.actions.enterprise-github-hosted-runners %}
{% data reusables.actions.ae-beta %}
## 关于自托管运行器组
## About self-hosted runner groups
{% ifversion fpt or ghec %}
{% ifversion fpt %}
{% note %}
**注:**所有组织都有一个默认的自托管运行器组。 只有企业帐户和企业帐户拥有的组织才能创建和管理其他自托管的运行器组。
**Note:** All organizations have a single default self-hosted runner group. Only enterprise accounts and organizations owned by enterprise accounts can create and manage additional self-hosted runner groups.
{% endnote %}
Self-hosted runner groups are used to control access to self-hosted runners. Organization admins can configure access policies that control which repositories in an organization have access to the runner group.
If you use {% data variables.product.prodname_ghe_cloud %}, you can create additional runner groups; enterprise admins can configure access policies that control which organizations in an enterprise have access to the runner group; and organization admins can assign additional granular repository access policies to the enterprise runner group. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups).
{% endif %}
自托管运行器组用于控制对组织和企业级自托管运行器的访问。 企业管理员可以配置访问策略,用以控制企业中的哪些组织可以访问运行器组。 组织管理员可以配置访问策略,用以控制组织中的哪些组织可以访问运行器组。
{% ifversion ghec or ghes or ghae %}
Self-hosted runner groups are used to control access to self-hosted runners at the organization and enterprise level. Enterprise admins can configure access policies that control which organizations in an enterprise have access to the runner group. Organization admins can configure access policies that control which repositories in an organization have access to the runner group.
当企业管理员授予组织对运行器组的访问权限时,组织管理员可以看到组织的自托管运行器设置中列出的运行器组。 然后,组织管理员可以为企业运行器组分配其他细致的仓库访问策略。
When an enterprise admin grants an organization access to a runner group, organization admins can see the runner group listed in the organization's self-hosted runner settings. The organizations admins can then assign additional granular repository access policies to the enterprise runner group.
新运行器在创建时,将自动分配给默认组。 运行器每次只能在一个组中。 您可以将运行器从默认组移到另一组。 更多信息请参阅“[将自托管运行器移动到组](#moving-a-self-hosted-runner-to-a-group)”。
When new runners are created, they are automatically assigned to the default group. Runners can only be in one group at a time. You can move runners from the default group to another group. For more information, see "[Moving a self-hosted runner to a group](#moving-a-self-hosted-runner-to-a-group)."
## 为组织创建自托管的运行器组
## Creating a self-hosted runner group for an organization
所有组织都有一个默认的自托管运行器组。 企业帐户中的组织可以创建其他自托管组。 组织管理员可以允许单个仓库访问运行器组。 有关如何使用 REST API 创建自托管运行器组的信息,请参阅“[自托管运行器组](/rest/reference/actions#self-hosted-runner-groups)”。
All organizations have a single default self-hosted runner group. Organizations within an enterprise account can create additional self-hosted groups. Organization admins can allow individual repositories access to a runner group. For information about how to create a self-hosted runner group with the REST API, see "[Self-hosted runner groups](/rest/reference/actions#self-hosted-runner-groups)."
自托管运行器在创建时会自动分配给默认组,并且每次只能成为一个组的成员。 您可以将运行器从默认组移到您创建的任何组。
Self-hosted runners are automatically assigned to the default group when created, and can only be members of one group at a time. You can move a runner from the default group to any group you create.
创建组时,必须选择用于定义哪些仓库有权访问运行器组的策略。
When creating a group, you must choose a policy that defines which repositories have access to the runner group.
{% ifversion fpt or ghec %}
{% ifversion ghec %}
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.org_settings %}
{% data reusables.github-actions.settings-sidebar-actions-runner-groups %}
1. 在“Runner groups(运行器组)”部分,单击 **New runner group(新运行器组)**
1. In the "Runner groups" section, click **New runner group**.
{% data reusables.github-actions.runner-group-assign-policy-repo %}
{% warning %}
**警告:** {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %}
**Warning**: {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %}
更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)."
{% endwarning %}
{% data reusables.github-actions.self-hosted-runner-create-group %}
@@ -61,50 +66,50 @@ shortTitle: 管理运行器组
{% data reusables.organizations.navigate-to-org %}
{% data reusables.organizations.org_settings %}
{% data reusables.github-actions.settings-sidebar-actions-runners %}
1. 在“Self-hosted runners(自托管运行器)”部分,单击 **Add new(新增)**,然后单击 **New group(新组)**
1. In the "Self-hosted runners" section, click **Add new**, and then **New group**.
![添加运行器组](/assets/images/help/settings/actions-org-add-runner-group.png)
1. 输入运行程序组的名称,并分配仓库访问策略。
![Add runner group](/assets/images/help/settings/actions-org-add-runner-group.png)
1. Enter a name for your runner group, and assign a policy for repository access.
{% ifversion ghes or ghae %} 您可以配置一个运行器组可供一组特定的仓库或组织中所有仓库访问。 默认情况下,只有私有仓库可以访问运行器组中的运行器,但您可以覆盖此设置。 This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.{% endif %}
{% ifversion ghes or ghae %} You can configure a runner group to be accessible to a specific list of repositories, or to all repositories in the organization. By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.{% endif %}
{% warning %}
**警告**
**Warning**
{% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %}
更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)."
{% endwarning %}
![添加运行器组选项](/assets/images/help/settings/actions-org-add-runner-group-options.png)
1. 单击 **Save group(保存组)**创建组并应用策略。
![Add runner group options](/assets/images/help/settings/actions-org-add-runner-group-options.png)
1. Click **Save group** to create the group and apply the policy.
{% endif %}
## 为企业创建自托管运行器组
## Creating a self-hosted runner group for an enterprise
企业可以将其自托管的运行器添加到组以进行访问管理。 企业可以创建供企业帐户中特定组织访问的自托管运行器组。 然后,组织管理员可以为企业运行器组分配其他细致的仓库访问策略。 有关如何使用 REST API 创建自托管运行器组的信息,请参阅[企业管理 GitHub Actions API](/rest/reference/enterprise-admin#github-actions)
Enterprises can add their self-hosted runners to groups for access management. Enterprises can create groups of self-hosted runners that are accessible to specific organizations in the enterprise account. Organization admins can then assign additional granular repository access policies to the enterprise runner groups. For information about how to create a self-hosted runner group with the REST API, see the [Enterprise Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions).
自托管运行器在创建时会自动分配给默认组,并且每次只能成为一个组的成员。 您可以在注册过程中将运行器分配给特定组,也可以稍后将运行器从默认组移到自定义组。
Self-hosted runners are automatically assigned to the default group when created, and can only be members of one group at a time. You can assign the runner to a specific group during the registration process, or you can later move the runner from the default group to a custom group.
创建组时,必须选择用于定义哪些组织有权访问运行器组的策略。
When creating a group, you must choose a policy that defines which organizations have access to the runner group.
{% ifversion fpt or ghec %}
{% ifversion ghec %}
{% 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(新运行器组)**
1. Click **New runner group**.
{% data reusables.github-actions.runner-group-assign-policy-org %}
{% warning %}
**警告**
**Warning**
{% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %}
更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)."
{% endwarning %}
{% data reusables.github-actions.self-hosted-runner-create-group %}
@@ -114,88 +119,99 @@ shortTitle: 管理运行器组
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.actions-tab %}
{% data reusables.enterprise-accounts.actions-runners-tab %}
1. 单击 **Add new(新增)**,然后单击 **New group(新组)**
1. Click **Add new**, and then **New group**.
![添加运行器组](/assets/images/help/settings/actions-enterprise-account-add-runner-group.png)
1. 输入运行程序组的名称,并分配组织访问策略。
![Add runner group](/assets/images/help/settings/actions-enterprise-account-add-runner-group.png)
1. Enter a name for your runner group, and assign a policy for organization access.
您可以配置运行器组供特定的组织列表或企业中所有组织访问。 默认情况下,只有私有仓库可以访问运行器组中的运行器,但您可以覆盖此设置。 This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.
You can configure a runner group to be accessible to a specific list of organizations, or all organizations in the enterprise. By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.
{% warning %}
**警告**
**Warning**
{% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %}
更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。
For more information, see "[About self-hosted runners](/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)
1. 单击 **Save group(保存组)**创建组并应用策略。
![Add runner group options](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options.png)
1. Click **Save group** to create the group and apply the policy.
{% endif %}
{% endif %}
## 更改自托管运行器组的访问策略
## Changing the access policy of a self-hosted runner group
您可以更新运行器组的访问策略,或重命名运行器组。
You can update the access policy of a runner group, or rename a runner group.
{% ifversion fpt or ghec %}
{% data reusables.github-actions.self-hosted-runner-groups-navigate-to-repo-org-enterprise %}
{% data reusables.github-actions.settings-sidebar-actions-runner-groups-selection %}
1. 修改访问选项或更改运行器组名称。
1. Modify the access options, or change the runner group name.
{% warning %}
**警告**
**Warning**
{% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %}
更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。
For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)."
{% endwarning %}
{% endif %}
{% ifversion ghae or ghes %}
{% data reusables.github-actions.self-hosted-runner-configure-runner-group-access %}
{% endif %}
## 自动向组添加自托管运行器
您可以使用配置脚本自动向组添加新的自托管运行器。 例如, 此命令将注册一个新的自托管运行器,并使用 `--runnergroup` 参数将其添加到名为 `rg-runnergroup` 的组。
{% ifversion ghec or ghes or ghae %}
## Automatically adding a self-hosted runner to a group
You can use the configuration script to automatically add a new self-hosted runner to a group. For example, this command registers a new self-hosted runner and uses the `--runnergroup` parameter to add it to a group named `rg-runnergroup`.
```sh
./config.sh --url $org_or_enterprise_url --token $token --runnergroup rg-runnergroup
```
如果运行器组不存在,命令将失败:
The command will fail if the runner group doesn't exist:
```
找不到名为 "rg-runnergroup" 的任何自托管运行器组。
Could not find any self-hosted runner group named "rg-runnergroup".
```
## 将自托管的运行器移动到组
## Moving a self-hosted runner to a group
如果您在注册过程中没有指定运行器组,新的自托管运行器将自动分配到默认组,然后可以移到另一个组。
{% ifversion fpt or ghec or ghes > 3.1 or ghae-next %}
If you don't specify a runner group during the registration process, your new self-hosted runners are automatically assigned to the default group, and can then be moved to another group.
{% ifversion ghec or ghes > 3.1 or ghae-next %}
{% data reusables.github-actions.self-hosted-runner-navigate-to-org-enterprise %}
1. 在“Runners运行器”列表中单击您要配置的运行器。
1. 选择运行器组下拉菜单。
1. 在“Move runner to group(将运行器移动到组)”中,选择运行器的目的地组。
{% else %}
1. 在设置页面的“Self-hosted runners自托管运行器部分找到要移动的运行器的当前组并展开组成员列表。 ![查看运行器组成员](/assets/images/help/settings/actions-org-runner-group-members.png)
1. 选中自托管运行器旁边的复选框,然后单击 **Move to group移动到组**以查看可用的目的地。 ![运行器组成员移动](/assets/images/help/settings/actions-org-runner-group-member-move.png)
1. 要移动运行器,请单击目标组。 ![运行器组成员移动](/assets/images/help/settings/actions-org-runner-group-member-move-destination.png)
1. In the "Runners" list, click the runner that you want to configure.
2. Select the Runner group dropdown menu.
3. In "Move runner to group", choose a destination group for the runner.
{% endif %}
## 删除自托管运行器组
{% ifversion ghes < 3.2 or ghae %}
1. In the "Self-hosted runners" section of the settings page, locate the current group of the runner you want to move and expand the list of group members.
![View runner group members](/assets/images/help/settings/actions-org-runner-group-members.png)
2. Select the checkbox next to the self-hosted runner, and then click **Move to group** to see the available destinations.
![Runner group member move](/assets/images/help/settings/actions-org-runner-group-member-move.png)
3. To move the runner, click on the destination group.
![Runner group member move](/assets/images/help/settings/actions-org-runner-group-member-move-destination.png)
{% endif %}
## Removing a self-hosted runner group
自托管运行器在其组被删除时将自动返回到默认组。
Self-hosted runners are automatically returned to the default group when their group is removed.
{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %}
{% ifversion ghes > 3.1 or ghae-next or ghec %}
{% data reusables.github-actions.self-hosted-runner-groups-navigate-to-repo-org-enterprise %}
1. 在组列表中,在要删除的组右侧,单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}
1. 要删除组,请单击 **Remove group(删除组)**
1. 查看确认提示,然后单击 **Remove this runner group(删除此运行器组)**
{% else %}
1. 在设置页面的“Self-hosted runners自托管运行器”部分找到要删除的组然后单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} 按钮。 ![查看运行器组设置](/assets/images/help/settings/actions-org-runner-group-kebab.png)
1. 要删除组,请单击 **Remove group删除组**。 ![查看运行器组设置](/assets/images/help/settings/actions-org-runner-group-remove.png)
1. 查看确认提示,然后单击 **Remove this runner group删除此运行器组**
1. In the list of groups, to the right of the group you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}.
2. To remove the group, click **Remove group**.
3. Review the confirmation prompts, and click **Remove this runner group**.
{% endif %}
{% ifversion ghes < 3.2 or ghae %}
1. In the "Self-hosted runners" section of the settings page, locate the group you want to delete, and click the {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} button.
![View runner group settings](/assets/images/help/settings/actions-org-runner-group-kebab.png)
1. To remove the group, click **Remove group**.
![View runner group settings](/assets/images/help/settings/actions-org-runner-group-remove.png)
1. Review the confirmation prompts, and click **Remove this runner group**.
{% endif %}
{% endif %}

View File

@@ -1,6 +1,6 @@
---
title: Removing self-hosted runners
intro: 'You can permanently remove a self-hosted runner from a repository, an organization, or an enterprise.'
intro: 'You can permanently remove a self-hosted runner from a repository{% ifversion fpt %} or organization{% elsif ghec or ghes or gahe %}, an organization, or an enterprise{% endif %}.'
redirect_from:
- /github/automating-your-workflow-with-github-actions/removing-self-hosted-runners
- /actions/automating-your-workflow-with-github-actions/removing-self-hosted-runners
@@ -73,6 +73,10 @@ To remove a self-hosted runner from an organization, you must be an organization
{% endif %}
## Removing a runner from an enterprise
{% ifversion fpt %}
If you use {% data variables.product.prodname_ghe_cloud %}, you can also remove runners from an enterprise. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-an-enterprise).
{% endif %}
{% ifversion ghec or ghes or ghae %}
{% note %}
**Note:** {% data reusables.github-actions.self-hosted-runner-removal-impact %}
@@ -80,9 +84,10 @@ To remove a self-hosted runner from an organization, you must be an organization
{% data reusables.github-actions.self-hosted-runner-auto-removal %}
{% endnote %}
{% data reusables.github-actions.self-hosted-runner-reusing %}
{% ifversion fpt or ghec %}
{% ifversion ghec %}
To remove a self-hosted runner from an enterprise account, you must be an enterprise owner. We recommend that you also have access to the self-hosted runner machine. For information about how to add a self-hosted runner with the REST API, see the [Enterprise Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions).
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.policies-tab %}
@@ -98,3 +103,4 @@ To remove a self-hosted runner at the enterprise level of {% data variables.prod
{% data reusables.enterprise-accounts.actions-runners-tab %}
{% data reusables.github-actions.self-hosted-runner-removing-a-runner %}
{% endif %}
{% endif %}

View File

@@ -465,7 +465,7 @@ In this example, `job3` uses the `always()` conditional expression so that it al
## `jobs.<job_id>.runs-on`
**Required**. The type of machine to run the job on. The machine can be either a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner.
**Required**. The type of machine to run the job on. The machine can be either a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner. You can provide `runs-on` as a single string or as an array of strings.
{% ifversion ghae %}
### {% data variables.actions.hosted_runner %}s

View File

@@ -137,3 +137,4 @@ includeGuides:
- /admin/user-management/suspending-and-unsuspending-users
- /admin/overview/creating-an-enterprise-account
---

View File

@@ -1,6 +1,6 @@
---
title: 代码安全指南
intro: '了解 {% data variables.product.product_name %} 可以帮助您提高代码安全性的不同方式。'
title: Guides for code security
intro: 'Learn about the different ways that {% data variables.product.product_name %} can help you improve your code''s security.'
allowTitleToDifferFromFilename: true
layout: product-guides
versions:
@@ -78,3 +78,4 @@ includeGuides:
- /code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph
- /code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository
---

View File

@@ -1,6 +1,6 @@
---
title: 管理来自密码扫描的警报
intro: 您可以查看并关闭已检入仓库的密码的警报。
title: Managing alerts from secret scanning
intro: You can view and close alerts for secrets checked in to your repository.
product: '{% data reusables.gated-features.secret-scanning %}'
redirect_from:
- /github/administering-a-repository/managing-alerts-from-secret-scanning
@@ -16,51 +16,55 @@ topics:
- Advanced Security
- Alerts
- Repositories
shortTitle: 管理秘密警报
shortTitle: Manage secret alerts
---
{% data reusables.secret-scanning.beta %}
## 管理 {% data variables.product.prodname_secret_scanning %} 警报
## Managing {% data variables.product.prodname_secret_scanning %} alerts
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-security %}
3. 在左侧边栏中,单击 **Secret scanning alerts(机密扫描警报)**
3. In the left sidebar, click **Secret scanning alerts**.
{% ifversion fpt or ghes or ghec %}
!["Secret scanning alerts(机密扫描警报)" 选项卡](/assets/images/help/repository/sidebar-secrets.png)
!["Secret scanning alerts" tab](/assets/images/help/repository/sidebar-secrets.png)
{% endif %}
{% ifversion ghae %}
!["Secret scanning alerts(机密扫描警报)" 选项卡](/assets/images/enterprise/github-ae/repository/sidebar-secrets-ghae.png)
!["Secret scanning alerts" tab](/assets/images/enterprise/github-ae/repository/sidebar-secrets-ghae.png)
{% endif %}
4. 在“Secret scanning(密码扫描)”下,单击要查看的警报。
4. Under "Secret scanning" click the alert you want to view.
{% ifversion fpt or ghec %}
![来自密码扫描的警报](/assets/images/help/repository/secret-scanning-click-alert.png)
![List of alerts from secret scanning](/assets/images/help/repository/secret-scanning-click-alert.png)
{% endif %}
{% ifversion ghes %}
![来自密码扫描的警报](/assets/images/help/repository/secret-scanning-click-alert-ghe.png)
![List of alerts from secret scanning](/assets/images/help/repository/secret-scanning-click-alert-ghe.png)
{% endif %}
{% ifversion ghae %}
![来自密码扫描的警报](/assets/images/enterprise/github-ae/repository/secret-scanning-click-alert-ghae.png)
![List of alerts from secret scanning](/assets/images/enterprise/github-ae/repository/secret-scanning-click-alert-ghae.png)
{% endif %}
5. {% ifversion fpt or ghec %}
Optionally, use the "Close as" drop-down menu and click a reason for resolving an alert.
{%- elsif ghes or ghae %}
Optionally, use the "Mark as" drop-down menu and click a reason for resolving an alert.
{% endif %}
5. 可选使用“Mark as标记为”下拉菜单单击原因以解决警报。
{% ifversion fpt or ghec %}
![用于解决来自密码扫描的警报的下拉菜单](/assets/images/help/repository/secret-scanning-resolve-alert.png)
![Drop-down menu for resolving an alert from secret scanning](/assets/images/help/repository/secret-scanning-resolve-alert.png)
{% endif %}
{% ifversion ghes or ghae %}
![用于解决来自密码扫描的警报的下拉菜单](/assets/images/help/repository/secret-scanning-resolve-alert-ghe.png)
![Drop-down menu for resolving an alert from secret scanning](/assets/images/help/repository/secret-scanning-resolve-alert-ghe.png)
{% endif %}
## 保护受到威胁的密码
## Securing compromised secrets
只要密码被提交到仓库,便应视为受到威胁。 {% data variables.product.prodname_dotcom %} 建议对受到威胁的密码执行以下操作:
Once a secret has been committed to a repository, you should consider the secret compromised. {% data variables.product.prodname_dotcom %} recommends the following actions for compromised secrets:
- 对于受到威胁的 {% data variables.product.prodname_dotcom %} 个人访问令牌,请删除该令牌,创建新令牌,然后更新使用旧令牌的任何服务。 更多信息请参阅“[创建用于命令行的个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)。”
- 对于所有其他密码,请先确认提交到 {% data variables.product.product_name %} 的密码是有效的。 如果有效,请创建新密码,更新使用旧密码的任何服务,然后删除旧密码。
- For a compromised {% data variables.product.prodname_dotcom %} personal access token, delete the compromised token, create a new token, and update any services that use the old token. For more information, see "[Creating a personal access token for the command line](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)."
- For all other secrets, first verify that the secret committed to {% data variables.product.product_name %} is valid. If so, create a new secret, update any services that use the old secret, and then delete the old secret.
{% ifversion fpt or ghes > 3.1 or ghae-issue-4910 or ghec %}
## 配置 {% data variables.product.prodname_secret_scanning %} 警报的通知
## Configuring notifications for {% data variables.product.prodname_secret_scanning %} alerts
当检测到新的机密时,{% data variables.product.product_name %} 会根据用户的通知首选项通知对仓库安全警报具有访问权限的所有用户。 You will receive alerts if you are watching the repository, have enabled notifications for security alerts or for all the activity on the repository, are the author of the commit that contains the secret and are not ignoring the repository.
When a new secret is detected, {% data variables.product.product_name %} notifies all users with access to security alerts for the repository according to their notification preferences. You will receive alerts if you are watching the repository, have enabled notifications for security alerts or for all the activity on the repository, are the author of the commit that contains the secret and are not ignoring the repository.
更多信息请参阅“[管理仓库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)”和“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository)”。
For more information, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)" and "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository)."
{% endif %}

View File

@@ -1,8 +1,8 @@
---
title: 代码空间指南
shortTitle: 指南
title: Codespaces guides
shortTitle: Guides
product: '{% data reusables.gated-features.codespaces %}'
intro: 了解如何充分利用 GitHub
intro: Learn how to make the most of GitHub
allowTitleToDifferFromFilename: true
layout: product-guides
versions:
@@ -41,3 +41,4 @@ includeGuides:
- /codespaces/codespaces-reference/disaster-recovery-for-codespaces
- /codespaces/codespaces-reference/security-in-codespaces
---

View File

@@ -60,8 +60,8 @@ The complete list of available query parameters, permissions, and events is list
`webhook_active` | `boolean` | Set to `false` to disable webhook. Webhook is enabled by default.
`webhook_url` | `string` | The full URL that you would like to send webhook event payloads to.
{% ifversion ghes < 3.2 or ghae %}`webhook_secret` | `string` | You can specify a secret to secure your webhooks. See "[Securing your webhooks](/webhooks/securing/)" for more details.
{% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`.
`domain` | `string` | The URL of a content reference.
{% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`.{% ifversion ghes < 3.4 %}
`domain` | `string` | The URL of a content reference.{% endif %}
`single_file_name` | `string` | This is a narrowly-scoped permission that allows the app to access a single file in any repository. When you set the `single_file` permission to `read` or `write`, this field provides the path to the single file your {% data variables.product.prodname_github_app %} will manage. {% ifversion fpt or ghes or ghec %} If you need to manage multiple files, see `single_file_paths` below. {% endif %}{% ifversion fpt or ghes or ghec %}
`single_file_paths` | `array of strings` | This allows the app to access up ten specified files in a repository. When you set the `single_file` permission to `read` or `write`, this array can store the paths for up to ten files that your {% data variables.product.prodname_github_app %} will manage. These files all receive the same permission set by `single_file`, and do not have separate individual permissions. When two or more files are configured, the API returns `multiple_single_files=true`, otherwise it returns `multiple_single_files=false`.{% endif %}
@@ -73,8 +73,8 @@ Permission | Description
---------- | -----------
[`administration`](/rest/reference/permissions-required-for-github-apps/#permission-on-administration) | Grants access to various endpoints for organization and repository administration. Can be one of: `none`, `read`, or `write`.{% ifversion fpt or ghec %}
[`blocking`](/rest/reference/permissions-required-for-github-apps/#permission-on-blocking) | Grants access to the [Blocking Users API](/rest/reference/users#blocking). Can be one of: `none`, `read`, or `write`.{% endif %}
[`checks`](/rest/reference/permissions-required-for-github-apps/#permission-on-checks) | Grants access to the [Checks API](/rest/reference/checks). Can be one of: `none`, `read`, or `write`.
`content_references` | Grants access to the "[Create a content attachment](/rest/reference/apps#create-a-content-attachment)" endpoint. Can be one of: `none`, `read`, or `write`.
[`checks`](/rest/reference/permissions-required-for-github-apps/#permission-on-checks) | Grants access to the [Checks API](/rest/reference/checks). Can be one of: `none`, `read`, or `write`.{% ifversion ghes < 3.4 %}
`content_references` | Grants access to the "[Create a content attachment](/rest/reference/apps#create-a-content-attachment)" endpoint. Can be one of: `none`, `read`, or `write`.{% endif %}
[`contents`](/rest/reference/permissions-required-for-github-apps/#permission-on-contents) | Grants access to various endpoints that allow you to modify repository contents. Can be one of: `none`, `read`, or `write`.
[`deployments`](/rest/reference/permissions-required-for-github-apps/#permission-on-deployments) | Grants access to the [Deployments API](/rest/reference/repos#deployments). Can be one of: `none`, `read`, or `write`.{% ifversion fpt or ghes or ghec %}
[`emails`](/rest/reference/permissions-required-for-github-apps/#permission-on-emails) | Grants access to the [Emails API](/rest/reference/users#emails). Can be one of: `none`, `read`, or `write`.{% endif %}
@@ -109,8 +109,8 @@ Webhook event name | Required permission | Description
------------------ | ------------------- | -----------
[`check_run`](/webhooks/event-payloads/#check_run) |`checks` | {% data reusables.webhooks.check_run_short_desc %}
[`check_suite`](/webhooks/event-payloads/#check_suite) |`checks` | {% data reusables.webhooks.check_suite_short_desc %}
[`commit_comment`](/webhooks/event-payloads/#commit_comment) | `contents` | {% data reusables.webhooks.commit_comment_short_desc %}
[`content_reference`](/webhooks/event-payloads/#content_reference) |`content_references` | {% data reusables.webhooks.content_reference_short_desc %}
[`commit_comment`](/webhooks/event-payloads/#commit_comment) | `contents` | {% data reusables.webhooks.commit_comment_short_desc %}{% ifversion ghes < 3.4 %}
[`content_reference`](/webhooks/event-payloads/#content_reference) |`content_references` | {% data reusables.webhooks.content_reference_short_desc %}{% endif %}
[`create`](/webhooks/event-payloads/#create) | `contents` | {% data reusables.webhooks.create_short_desc %}
[`delete`](/webhooks/event-payloads/#delete) | `contents` | {% data reusables.webhooks.delete_short_desc %}
[`deployment`](/webhooks/event-payloads/#deployment) | `deployments` | {% data reusables.webhooks.deployment_short_desc %}

View File

@@ -1,46 +1,42 @@
---
title: 使用内容附件
intro: 内容附件允许 GitHub 应用程序在 GitHub 中为链接到注册域的 URL 提供更多信息。 GitHub 可渲染应用程序在正文或者议题或拉取请求注释中的 URL 下提供的信息。
title: Using content attachments
intro: Content attachments allow a GitHub App to provide more information in GitHub for URLs that link to registered domains. GitHub renders the information provided by the app under the URL in the body or comment of an issue or pull request.
redirect_from:
- /apps/using-content-attachments
- /developers/apps/using-content-attachments
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
ghes: '<3.4'
topics:
- GitHub Apps
---
{% data reusables.pre-release-program.content-attachments-public-beta %}
## 关于内容附件
## About content attachments
GitHub 应用程序可以注册将触发 `content_reference` 事件的域。 当有人在正文或者议题或拉取请求的注释中包含链接到注册域的 URL 时,应用程序会收到 [`content_reference` web 挂钩](/webhooks/event-payloads/#content_reference)。 您可以使用内容附件直观地为添加到议题或拉取请求的 URL 提供更多的上下文或数据。 URL 必须是完全合格的 URL `http://` `https://` 开头。 作为 Markdown 链接一部分的 URL 将被忽略,不会触发 `content_reference` 事件。
A GitHub App can register domains that will trigger `content_reference` events. When someone includes a URL that links to a registered domain in the body or comment of an issue or pull request, the app receives the [`content_reference` webhook](/webhooks/event-payloads/#content_reference). You can use content attachments to visually provide more context or data for the URL added to an issue or pull request. The URL must be a fully-qualified URL, starting with either `http://` or `https://`. URLs that are part of a markdown link are ignored and don't trigger the `content_reference` event.
在使用 {% data variables.product.prodname_unfurls %} API 之前,您需要为 GitHub 应用程序配置内容引用:
* 为应用程序提供对“内容引用”的 `Read & write` 权限。
* 配置“内容引用”权限时,注册最多 5 个有效且可公开访问的域。 配置内容引用域时不要使用 IP 地址。 您可以注册域名 (example.com) 或子域 (subdomain.example.com)
* 让应用程序订阅“内容引用”事件。
Before you can use the {% data variables.product.prodname_unfurls %} API, you'll need to configure content references for your GitHub App:
* Give your app `Read & write` permissions for "Content references."
* Register up to 5 valid, publicly accessible domains when configuring the "Content references" permission. Do not use IP addresses when configuring content reference domains. You can register a domain name (example.com) or a subdomain (subdomain.example.com).
* Subscribe your app to the "Content reference" event.
将应用程序安装到仓库中后,仓库中包含注册域 URL 的议题或拉取请求注释将生成内容引用事件。 应用程序必须在发布内容引用 URL 后六小时内创建内容附件。
Once your app is installed on a repository, issue or pull request comments in the repository that contain URLs for your registered domains will generate a content reference event. The app must create a content attachment within six hours of the content reference URL being posted.
内容附件不会追溯更新 URL。 只有在您根据上述要求配置了应用程序,并且有人在其仓库中安装应用程序之后,它才会更新添加到议题或拉取请求中的 URL。
Content attachments will not retroactively update URLs. It only works for URLs added to issues or pull requests after you configure the app using the requirements outlined above and then someone installs the app on their repository.
有关配置 GitHub 应用程序权限和事件订阅所需的步骤,请参阅“[创建 GitHub 应用程序](/apps/building-github-apps/creating-a-github-app/)”或“[编辑 GitHub 应用程序的权限](/apps/managing-github-apps/editing-a-github-app-s-permissions/)”。
See "[Creating a GitHub App](/apps/building-github-apps/creating-a-github-app/)" or "[Editing a GitHub App's permissions](/apps/managing-github-apps/editing-a-github-app-s-permissions/)" for the steps needed to configure GitHub App permissions and event subscriptions.
## 实现内容附件流程
## Implementing the content attachment flow
内容附件流程向您显示议题或拉取请求中的 URL、`content_reference` web 挂钩事件以及使用额外信息更新议题或拉取请求所需调用的 REST API 端点之间的关系。
The content attachment flow shows you the relationship between the URL in the issue or pull request, the `content_reference` webhook event, and the REST API endpoint you need to call to update the issue or pull request with additional information:
**步骤 1.** 使用[关于内容附件](#about-content-attachments)中的指南设置应用程序。 您也可以根据 [Probot 应用程序示例](#example-using-probot-and-github-app-manifests)开始使用内容附件。
**Step 1.** Set up your app using the guidelines outlined in [About content attachments](#about-content-attachments). You can also use the [Probot App example](#example-using-probot-and-github-app-manifests) to get started with content attachments.
**步骤 2.** 将注册域的 URL 添加到议题或拉取请求。 必须使用以 `http://` `https://` 开头的完全合格 URL。
**Step 2.** Add the URL for the domain you registered to an issue or pull request. You must use a fully qualified URL that starts with `http://` or `https://`.
![添加到议题的 URL](/assets/images/github-apps/github_apps_content_reference.png)
![URL added to an issue](/assets/images/github-apps/github_apps_content_reference.png)
**步骤 3.**应用程序将收到带有操作 `created` [`content_reference` web 挂钩](/webhooks/event-payloads/#content_reference)
**Step 3.** Your app will receive the [`content_reference` webhook](/webhooks/event-payloads/#content_reference) with the action `created`.
``` json
{
@@ -61,12 +57,12 @@ GitHub 应用程序可以注册将触发 `content_reference` 事件的域。 当
}
```
**步骤 4.** 应用程序使用 `content_reference` `id` `repository` `full_name` 字段以使用 REST API [创建内容附件](/rest/reference/apps#create-a-content-attachment)。 您还需要 `installation` `id` 以验证为 [GitHub 应用程序安装设施](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)
**Step 4.** The app uses the `content_reference` `id` and `repository` `full_name` fields to [Create a content attachment](/rest/reference/apps#create-a-content-attachment) using the REST API. You'll also need the `installation` `id` to authenticate as a [GitHub App installation](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation).
{% data reusables.pre-release-program.corsair-preview %}
{% data reusables.pre-release-program.api-preview-warning %}
`body` 参数可包含 Markdown
The `body` parameter can contain markdown:
```shell
curl -X POST \
@@ -74,24 +70,24 @@ curl -X POST \
-H 'Accept: application/vnd.github.corsair-preview+json' \
-H 'Authorization: Bearer $INSTALLATION_TOKEN' \
-d '{
"title": "[A-1234] Error found in core/models.py file",
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
"title": "[A-1234] Error found in core/models.py file",
"body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
}'
```
有关创建和安装令牌的更多信息,请参阅“[验证为 GitHub 应用程序](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)”。
For more information about creating an installation token, see "[Authenticating as a GitHub App](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)."
**步骤 5.** 在拉取请求或议题注释中,您将看到新的内容附件显示在链接下:
**Step 5.** You'll see the new content attachment appear under the link in a pull request or issue comment:
![附加到议题引用的内容](/assets/images/github-apps/content_reference_attachment.png)
![Content attached to a reference in an issue](/assets/images/github-apps/content_reference_attachment.png)
## 在 GraphQL 中使用内容附件
我们在 [`content_reference` web 挂钩](/webhooks/event-payloads/#content_reference)中提供 `node_id`,以便您可以在 GraphQL API 中引用 `createContentAttachment` 突变。
## Using content attachments in GraphQL
We provide the `node_id` in the [`content_reference` webhook](/webhooks/event-payloads/#content_reference) event so you can refer to the `createContentAttachment` mutation in the GraphQL API.
{% data reusables.pre-release-program.corsair-preview %}
{% data reusables.pre-release-program.api-preview-warning %}
例如:
For example:
``` graphql
mutation {
@@ -110,7 +106,7 @@ mutation {
}
}
```
示例 cURL
Example cURL:
```shell
curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \
@@ -122,16 +118,16 @@ curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \
}'
```
有关 `node_id` 的更多信息,请参阅“[使用全局节点 ID]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-global-node-ids)”。
For more information on `node_id`, see "[Using Global Node IDs]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-global-node-ids)."
## 使用 Probot GitHub 应用程序清单的示例
## Example using Probot and GitHub App Manifests
要快速设置可使用 {% data variables.product.prodname_unfurls %} API 的 GitHub 应用程序,您可以使用 [Probot](https://probot.github.io/)。 要了解 Probot 如何使用 GitHub 应用程序清单,请参阅“[从清单创建 GitHub 应用程序](/apps/building-github-apps/creating-github-apps-from-a-manifest/)”。
To quickly setup a GitHub App that can use the {% data variables.product.prodname_unfurls %} API, you can use [Probot](https://probot.github.io/). See "[Creating GitHub Apps from a manifest](/apps/building-github-apps/creating-github-apps-from-a-manifest/)" to learn how Probot uses GitHub App Manifests.
要创建 Probot 应用程序,请按照以下步骤操作:
To create a Probot App, follow these steps:
1. [生成新的 GitHub 应用程序](https://probot.github.io/docs/development/#generating-a-new-app)
2. 打开您创建的项目,自定义 `app.yml` 文件中的设置。 订阅 `content_reference` 事件并启用 `content_references` 写入权限:
1. [Generate a new GitHub App](https://probot.github.io/docs/development/#generating-a-new-app).
2. Open the project you created, and customize the settings in the `app.yml` file. Subscribe to the `content_reference` event and enable `content_references` write permissions:
``` yml
default_events:
@@ -150,7 +146,7 @@ curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \
value: example.org
```
3. 将此代码添加到 `index.js` 文件以处理 `content_reference` 事件并调用 REST API
3. Add this code to the `index.js` file to handle `content_reference` events and call the REST API:
``` javascript
module.exports = app => {
@@ -171,13 +167,13 @@ curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \
}
```
4. [在本地运行 GitHub 应用程序](https://probot.github.io/docs/development/#running-the-app-locally)。 导航到 `http://localhost:3000` 然后单击 **Register GitHub App(注册 GitHub 应用程序)**按钮:
4. [Run the GitHub App locally](https://probot.github.io/docs/development/#running-the-app-locally). Navigate to `http://localhost:3000`, and click the **Register GitHub App** button:
![注册 Probot GitHub 应用程序](/assets/images/github-apps/github_apps_probot-registration.png)
![Register a Probot GitHub App](/assets/images/github-apps/github_apps_probot-registration.png)
5. 在测试仓库中安装应用程序。
6. 在测试仓库中创建议题。
7. 将注释添加到您打开的议题,包括您在 `app.yml` 文件中配置的 URL。
8. 查看议题注释,您将看到如下所示的更新:
5. Install the app on a test repository.
6. Create an issue in your test repository.
7. Add a comment to the issue you opened that includes the URL you configured in the `app.yml` file.
8. Take a look at the issue comment and you'll see an update that looks like this:
![附加到议题引用的内容](/assets/images/github-apps/content_reference_attachment.png)
![Content attached to a reference in an issue](/assets/images/github-apps/content_reference_attachment.png)

View File

@@ -242,6 +242,7 @@ For more information, see "[Autolinked references and URLs](/articles/autolinked
{% data reusables.repositories.autolink-references %}
{% ifversion ghes < 3.4 %}
## Content attachments
Some {% data variables.product.prodname_github_apps %} provide information in {% data variables.product.product_name %} for URLs that link to their registered domains. {% data variables.product.product_name %} renders the information provided by the app under the URL in the body or comment of an issue or pull request.
@@ -252,7 +253,7 @@ To see content attachments, you must have a {% data variables.product.prodname_g
Content attachments will not be displayed for URLs that are part of a markdown link.
For more information about building a {% data variables.product.prodname_github_app %} that uses content attachments, see "[Using Content Attachments](/apps/using-content-attachments)."
For more information about building a {% data variables.product.prodname_github_app %} that uses content attachments, see "[Using Content Attachments](/apps/using-content-attachments)."{% endif %}
## Uploading assets

View File

@@ -1,7 +1,7 @@
---
title: Issues guides
shortTitle: 指南
intro: '了解如何使用 {% data variables.product.prodname_github_issues %} 来规划和跟踪您的工作。'
shortTitle: Guides
intro: 'Learn how you can use {% data variables.product.prodname_github_issues %} to plan and track your work.'
allowTitleToDifferFromFilename: true
layout: product-guides
versions:

View File

@@ -183,6 +183,7 @@ You can now configure whether organization members can create repositories and w
{% endif %}
{% ifversion ghes < 3.4 %}
## Content attachments
You can now provide more information in GitHub for URLs that link to registered domains by using the {% data variables.product.prodname_unfurls %} API. See "[Using content attachments](/apps/using-content-attachments/)" for more details.
@@ -190,6 +191,7 @@ You can now provide more information in GitHub for URLs that link to registered
**Custom media types:** `corsair-preview`
**Announced:** [2018-12-10](https://developer.github.com/changes/2018-12-10-content-attachments-api/)
{% endif %}
{% ifversion ghae or ghes < 3.3 %}
## Enable and disable Pages

View File

@@ -878,6 +878,7 @@ _Teams_
- [`GET /repos/:owner/:repo/secret-scanning/alerts`](/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository) (:read)
- [`GET /repos/:owner/:repo/secret-scanning/alerts/:alert_number`](/rest/reference/secret-scanning#get-a-secret-scanning-alert) (:read)
- [`PATCH /repos/:owner/:repo/secret-scanning/alerts/:alert_number`](/rest/reference/secret-scanning#update-a-secret-scanning-alert) (:write)
- [`GET /repos/:owner/:repo/secret-scanning/alerts/:alert_number/locations`](/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert) (:read)
{% endif %}
### Permission on "security events"

View File

@@ -1,7 +1,7 @@
---
title: GitHub Sponsors 指南
shortTitle: 指南
intro: '学习如何充分利用 {% data variables.product.prodname_sponsors %}'
title: GitHub Sponsors guides
shortTitle: Guides
intro: 'Learn how to make the most of {% data variables.product.prodname_sponsors %}.'
allowTitleToDifferFromFilename: true
layout: product-guides
versions:
@@ -16,3 +16,4 @@ includeGuides:
- /sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization
- /sponsors/integrating-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account
---

View File

@@ -6,7 +6,7 @@
产品的学习轨迹数据在两个地方定义:
1. 简单的学习轨迹名称数组在产品分类索引页面前缀中定义。
1. A simple array of learning track names is defined in the product guides index page frontmatter.
例如,在 `content/actions/guides/index.md` 中:
```
@@ -23,13 +23,13 @@
例如,在 `data/learning-tracks/actions.yml` 中,内容文件的 `learningTracks` 数组中每个项都用 `title`、`description` 和 `guides` 链接数组等额外数据来表示。
在此 YAML **每个版本**中,必须通过 `featured_track: true` 指定一个学习轨迹为“特色”学习轨迹,这将设置它出现在产品分类页面的顶部。 如果缺少此属性,测试将失败。
One learning track in this YAML **per version** must be designated as a "featured" learning track via `featured_track: true`, which will set it to appear at the top of the product guides page. 如果缺少此属性,测试将失败。
`featured_track` 属性可以是简单的布尔值(例如 `featured_track: true`),也可以是包含版本控制语句的字符串(例如 `featured_track: '{% ifversion fpt %}true{% else %}false{% endif %}'`)。 如果您使用版本控制,每个 YML 文件将有多个 `featured_track`,但请确保每个当前支持的版本中只有一个版本会呈现。 如果每个版本的特色链接多于或少于一个,测试将失败。
## 版本
学习轨迹的版本控制在页面渲染时进行处理。 代码位于 [`lib/learning-tracks.js`](lib/learning-tracks.js) 中,通过 `page.render()` 调用。 The processed learning tracks are then rendered by `components/sublanding`.
学习轨迹的版本控制在页面渲染时进行处理。 代码位于 [`lib/learning-tracks.js`](lib/learning-tracks.js) 中,通过 `page.render()` 调用。 The processed learning tracks are then rendered by `components/guides`.
Liquid 条件**不**需要用用于指南的 YAML 文件中的版本控制。 只有适用于当前版本的学习跟踪指南才会自动呈现。 如果没有任何属于当前版本的指南的跟踪,学习跟踪部分将不会呈现。

View File

@@ -1 +1 @@
<a href="https://github.com/account/organizations/new?plan=business_plus" class="btn btn-primary btn-large f4 mt-3 mr-3">Try risk-free for 14 days</a>
<a href="https://github.com/account/organizations/new?plan=business_plus" class="btn btn-primary btn-large f4 mt-3 mr-3">Try {% data variables.product.prodname_ghe_cloud %} for free</a>

View File

@@ -1 +1 @@
所有产品的**公共**仓库提供环境、环境保护规则和环境机密。 要访问**私人**仓库的环境,您必须使用 {% data variables.product.prodname_enterprise %}。{% ifversion fpt or ghec %} {% data reusables.gated-features.more-info %}{% endif %}
所有产品的**公共**仓库提供环境、环境保护规则和环境机密。 For access to environments in **private** repositories, you must use {% data variables.product.prodname_enterprise %}. {% data reusables.gated-features.more-info %}

View File

@@ -1,10 +1,17 @@
{% ifversion fpt %}
1. Navigate to the main page of the repository or organization where your self-hosted runner groups are located.
2. Click {% octicon "gear" aria-label="The Settings gear" %} **Settings**.
3. 在左侧边栏中,单击 **Actions操作**
4. Click **Runner groups**.
{% elsif ghec or ghes or ghae %}
1. Navigate to where your self-hosted runner groups are located:
* **In an organization**: navigate to the main page and click {% octicon "gear" aria-label="The Settings gear" %} **Settings**.
* {% ifversion fpt or ghec %}**如果使用企业帐户**:通过访问 `https://github.com/enterprises/ENTERPRISE-NAME`(将 `ENTERPRISE-NAME` 替换为您的企业帐户名称)导航到您的企业帐户。{% elsif ghes or ghae %}**如果使用企业级运行器**
* **In an organization**: navigate to the main page and click {% octicon "gear" aria-label="The Settings gear" %} **Settings**.{% ifversion ghec %}
* **If using an enterprise account**: navigate to your enterprise account by visiting `https://github.com/enterprises/ENTERPRISE-NAME`, replacing `ENTERPRISE-NAME` with your enterprise account's name.{% elsif ghes or ghae %}
* **如果使用企业级运行器**
1. 在任何页面的右上角,单击 {% octicon "rocket" aria-label="The rocket ship" %}。
1. 在左边栏中,单击 **Enterprise overview企业概览**
1. {% endif %} 在企业边栏中,单击 {% octicon "law" aria-label="The law icon" %} **Policies(政策)**
1. Navigate to the "Runner groups" settings:
* **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghec %}, then click **Runner groups** below it{% endif %}.
* {% ifversion fpt or ghec %}**If using an enterprise account**:{% elsif ghes or ghae %}**If using an enterprise-level runner**:{% endif %} Click **Actions** under "{% octicon "law" aria-label="The law icon" %} Policies"{% ifversion fpt or ghec %}, then click the **Runners groups** tab{% endif %}.
2. 在左边栏中,单击 **Enterprise overview企业概览**
3. In the enterprise sidebar, click {% octicon "law" aria-label="The law icon" %} **Policies**.{% endif %}
2. Navigate to the "Runner groups" settings:
* **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghec %}, then click **Runner groups** below it{% endif %}.{% ifversion ghec or ghes or ghae %}
* {% ifversion ghec %}**If using an enterprise account**:{% elsif ghes or ghae %}**If using an enterprise-level runner**:{% endif %} Click **Actions** under "{% octicon "law" aria-label="The law icon" %} Policies"{% ifversion ghec %}, then click the **Runners groups** tab{% endif %}.{% endif %}
{% endif %}

View File

@@ -1,3 +1,5 @@
要为工作指定自托管的运行器,请在工作流程文件中使用自托管运行器标签配置 `runs-on`
所有自托管运行器都有 `self-hosted` 标签。 仅使用此标签将选择任何自托管运行器。 To select runners that meet certain criteria, such as operating system or architecture, provide an array of labels that begins with `self-hosted` (this must be listed first) and then includes additional labels as needed.
所有自托管运行器都有 `self-hosted` 标签。 仅使用此标签将选择任何自托管运行器。 To select runners that meet certain criteria, such as operating system or architecture, we recommend providing an array of labels that begins with `self-hosted` (this must be listed first) and then includes additional labels as needed. When you specify an array of labels, jobs will be queued on runners that have all the labels that you specify.
Although the `self-hosted` label is not required, we strongly recommend specifying it when using self-hosted runners to ensure that your job does not unintentionally specify any current or future {% data variables.product.prodname_dotcom %}-hosted runners.

View File

@@ -2,7 +2,7 @@
- **用户仓库**:您必须是仓库所有者。
- **组织**:您必须是组织所有者。
- **组织仓库**:您必须是组织所有者或者拥有该仓库的管理员权限。
{% ifversion fpt or ghec %}
{% ifversion ghec %}
- **企业账户**:您必须是企业所有者。
{% elsif ghes or ghae %}
- **企业**:您必须是 {% data variables.product.prodname_enterprise %} 站点管理员。

View File

@@ -1,10 +1,17 @@
{% ifversion fpt %}
1. Navigate to the main page of the organization where your self-hosted runner group is registered.
2. Click {% octicon "gear" aria-label="The Settings gear" %} **Settings**.
3. 在左侧边栏中,单击 **Actions操作**
4. Click **Runners**.
{% elsif ghec or ghes or ghae %}
1. 导航到自托管运行器注册的位置:
* **In an organization**: navigate to the main page and click {% octicon "gear" aria-label="The Settings gear" %} **Settings**.
* {% ifversion fpt %}**如果使用企业帐户**:通过访问 `https://github.com/enterprises/ENTERPRISE-NAME`(将 `ENTERPRISE-NAME` 替换为您的企业帐户名称)导航到您的企业帐户。{% elsif ghes or ghae %}**如果使用企业级运行器**
* {% ifversion ghec %}**如果使用企业帐户**:通过访问 `https://github.com/enterprises/ENTERPRISE-NAME`(将 `ENTERPRISE-NAME` 替换为您的企业帐户名称)导航到您的企业帐户。{% elsif ghes or ghae %}**如果使用企业级运行器**
1. 在任何页面的右上角,单击 {% octicon "rocket" aria-label="The rocket ship" %}。
1. 在左边栏中,单击 **Enterprise overview企业概览**
1. {% endif %} 在企业边栏中,单击 {% octicon "law" aria-label="The law icon" %} **Policies(政策)**
1. In the enterprise sidebar, {% octicon "law" aria-label="The law icon" %} **Policies**.{% endif %}
1. 导航到 {% data variables.product.prodname_actions %} 设置:
* **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghes > 3.1 or ghae-next %}, then click **Runners**{% endif %}.
* {% ifversion fpt %}**如果使用企业帐户**{% elsif ghes or ghae %}**如果使用企业级运行器**{% endif %}:在“{% octicon "law" aria-label="The law icon" %} Policies政策”下单击 **Actions操作**{% ifversion fpt or ghes > 3.1 or ghae-next %},然后单击 **Runners运行器**选项卡{% endif %}。
* **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghec or ghes > 3.1 or ghae-next %}, then click **Runners**{% endif %}.
* {% ifversion ghec %}**如果使用企业帐户**{% elsif ghes or ghae %}**如果使用企业级运行器**{% endif %}:在“{% octicon "law" aria-label="The law icon" %} Policies政策”下单击 **Actions操作**{% ifversion fpt or ghec or ghes > 3.1 or ghae-next %},然后单击 **Runners运行器**选项卡{% endif %}。
{% endif %}

View File

@@ -1,10 +1,17 @@
{% ifversion fpt %}
1. Navigate to the main page of the organization or repository where your self-hosted runner group is registered.
2. Click {% octicon "gear" aria-label="The Settings gear" %} **Settings**.
3. 在左侧边栏中,单击 **Actions操作**
4. Click **Runners**.
{% elsif ghec or ghes or ghae %}
1. 导航到自托管运行器注册的位置:
* **在组织或仓库中**,导航到主页并单击 {% octicon "gear" aria-label="The Settings gear" %} **Settings设置**
* {% ifversion fpt or ghec %}**如果使用企业帐户**:通过访问 `https://github.com/enterprises/ENTERPRISE-NAME`(将 `ENTERPRISE-NAME` 替换为您的企业帐户名称)导航到您的企业帐户。{% elsif ghes or ghae %}**如果使用企业级运行器**
* **在组织或仓库中**,导航到主页并单击 {% octicon "gear" aria-label="The Settings gear" %} **Settings设置** {% ifversion ghec %}
* **If using an enterprise account**: navigate to your enterprise account by visiting `https://github.com/enterprises/ENTERPRISE-NAME`, replacing `ENTERPRISE-NAME` with your enterprise account's name.{% elsif ghes or ghae %}
* **如果使用企业级运行器**
1. 在任何页面的右上角,单击 {% octicon "rocket" aria-label="The rocket ship" %}。
1. 在左边栏中,单击 **Enterprise overview企业概览**
1. {% endif %} 在企业边栏中,单击 {% octicon "law" aria-label="The law icon" %} **Policies(政策)**
1. 导航到 {% data variables.product.prodname_actions %} 设置:
* **在组织或仓库中**:点击左侧栏中的 **Actions**{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %},然后点击 **Runners(运行器)**{% endif %}
* {% ifversion fpt or ghec %}**如果使用企业帐户**{% elsif ghes or ghae %}**如果使用企业级运行器**{% endif %}:在“{% octicon "law" aria-label="The law icon" %} Policies(政策)”下单击 **Actions操作**{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %},然后单击 **Runners运行器**选项卡{% endif %}。
2. 在左边栏中,单击 **Enterprise overview企业概览**
3. In the enterprise sidebar, click {% octicon "law" aria-label="The law icon" %} **Policies**.{% endif %}
2. 导航到 {% data variables.product.prodname_actions %} 设置:
* **In an organization or repository**: Click **Actions** in the left sidebar{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %}, then click **Runners**{% endif %}.{% ifversion ghec or ghae or ghes %}
* {% ifversion ghec %}**If using an enterprise account**:{% elsif ghes or ghae %}**If using an enterprise-level runner**:{% endif %} Click **Actions** under "{% octicon "law" aria-label="The law icon" %} Policies"{% ifversion ghes > 3.1 or ghae-next or ghec %}, then click the **Runners** tab{% endif %}.{% endif %}
{% endif %}

View File

@@ -1 +1 @@
或者,如果您无法访问 {% data variables.product.product_name %} 上的仓库、组织或企业来删除运行器,但您想重新使用该运行器机器,则可删除自托管运行器应用程序目录中的 `.runner` 文件。 这允许将运行器注册,而无需重新下载自托管的运行器应用程序。
Alternatively, if you don't have access to the repository{% ifversion fpt %} or organization{% elsif ghes or ghec or ghae %}, organization, or enterprise{% endif %} on {% data variables.product.product_name %} to remove a runner, but you would like to re-use the runner machine, then you can delete the `.runner` file inside the self-hosted runner application directory. 这允许将运行器注册,而无需重新下载自托管的运行器应用程序。

View File

@@ -150,7 +150,7 @@ product_landing:
upgrade_from: 升级自
browse_all_docs: 浏览所有文档
explore_release_notes: 浏览发行说明
product_sublanding:
product_guides:
start: 开始
start_path: 开始路径
learning_paths: '{{ productMap[currentProduct].name }} 学习路径'