New translation batch for cn (#28405)
* Add crowdin translations * Run script/i18n/homogenize-frontmatter.js * Run script/i18n/lint-translation-files.js --check rendering * run script/i18n/reset-files-with-broken-liquid-tags.js --language=cn * run script/i18n/reset-known-broken-translation-files.js * Check in cn CSV report
This commit is contained in:
@@ -134,6 +134,7 @@ translations/zh-CN/content/billing/managing-licenses-for-visual-studio-subscript
|
||||
translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise.md,broken liquid tags
|
||||
translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise.md,rendering error
|
||||
translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud.md,rendering error
|
||||
translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/troubleshooting-license-usage-for-github-enterprise.md,broken liquid tags
|
||||
translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server.md,broken liquid tags
|
||||
translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise.md,broken liquid tags
|
||||
translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md,broken liquid tags
|
||||
|
||||
|
@@ -33,7 +33,7 @@ topics:
|
||||
- 你拥有或参与的仓库和 gists。 {% ifversion fpt or ghes or ghec %}您可以通过将仓库和 Gist 固定到个人资料中来展示您的最佳作品。 更多信息请参阅“[将项目嵌入到个人资料](/github/setting-up-and-managing-your-github-profile/pinning-items-to-your-profile)”。{% endif %}
|
||||
- 您已加星标{% ifversion fpt or ghec %} 并组织到列表中的存储库。{% endif %} 更多信息请参阅“[保存有星标的存储库](/articles/saving-repositories-with-stars/)”。
|
||||
- 您在经常参与的组织、仓库和团队中的活动概述。 更多信息请参阅“[在您的个人资料中显示活动概述](/articles/showing-an-overview-of-your-activity-on-your-profile)”。{% ifversion fpt or ghec %}
|
||||
- Badges and Achievements that highlight your activity and show if you use {% data variables.product.prodname_pro %} or participate in programs like the {% data variables.product.prodname_arctic_vault %}, {% data variables.product.prodname_sponsors %}, or the {% data variables.product.company_short %} Developer Program. 更多信息请参阅“[个性化您的个人资料](/github/setting-up-and-managing-your-github-profile/personalizing-your-profile#displaying-badges-on-your-profile)”。{% endif %}
|
||||
- 徽章和成就,突显您的活动,并显示您是否使用 {% data variables.product.prodname_pro %} 或参与计划,例如 {% data variables.product.prodname_arctic_vault %}、{% data variables.product.prodname_sponsors %} 或 {% data variables.product.company_short %} 开发者计划。 更多信息请参阅“[个性化您的个人资料](/github/setting-up-and-managing-your-github-profile/personalizing-your-profile#displaying-badges-on-your-profile)”。{% endif %}
|
||||
|
||||
您还可以在个人资料上设置状态,以提供有关您的可用性的信息。 更多信息请参阅“[设置状态](/articles/personalizing-your-profile/#setting-a-status)”。
|
||||
|
||||
|
||||
@@ -132,23 +132,23 @@ shortTitle: 个性化
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
## Earning Achievements
|
||||
## 获取成就
|
||||
|
||||
Achievements celebrate specific events and actions that happen on {% data variables.product.prodname_dotcom %}. They will appear as small badges listed in the sidebar of your profile. Clicking or hovering on an achievement will show a detailed view that hints at how the achievement was earned, with a short description and links to the contributing events. The event links will only be visible to users that have access to the repository or organization that the event took place in. Event links will appear inaccessible to all users without access.
|
||||
成就用于庆祝 {% data variables.product.prodname_dotcom %} 上发生的具体活动和行动。 它们将显示为小徽章,列在个人资料的侧边栏中。 单击或悬停在成就上将显示一个详细视图,提示该成就是如何获得的,并带有简短描述和指向贡献事件的链接。 事件链接仅对有权访问事件发生的存储库或组织的用户可见。 没有访问权限的所有用户都将无法访问事件链接。
|
||||
|
||||
To stop private contributions from counting toward your Achievements, or to turn off Achievements entirely, see "[Showing your private contributions and Achievements on your profile](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)."
|
||||
要阻止私人贡献计入您的成就,或完全关闭成就,请参阅“[在个人资料上显示您的私人贡献和成就](/articles/publicizing-or-hiding-your-private-contributions-on-your-profile)”。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** This feature is currently in beta and subject to change.
|
||||
**注意**:此功能目前在测试中,可能会更改。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
## List of qualifying repositories for Mars 2020 Helicopter Contributor achievement
|
||||
## Mars 2020 Helicopter 贡献者成就的合格仓库列表
|
||||
|
||||
If you authored any commit(s) present in the commit history for the listed tag of one or more of the repositories below, you'll receive the Mars 2020 Helicopter Contributor achievement on your profile. 撰写的提交必须有验证过的电子邮件地址,该电子邮件地址在 {% data variables.product.prodname_dotcom %} 确定符合条件的贡献时与您帐户关联,表示该贡献归属于您。 您可以是提交的原始作者或 [共同作者](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors)。 将来对经过验证的电子邮件的更改不会对徽章产生影响。 我们根据从美国航天局喷气推进实验室获得的资料编制了清单。
|
||||
如果您为下面一个或多个仓库列出的标记撰写了提交历史记录中的任何提交,您的个人资料中将获得 Mars 2020 Helicopter 贡献者成就。 撰写的提交必须有验证过的电子邮件地址,该电子邮件地址在 {% data variables.product.prodname_dotcom %} 确定符合条件的贡献时与您帐户关联,表示该贡献归属于您。 您可以是提交的原始作者或 [共同作者](/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors)。 将来对经过验证的电子邮件的更改不会对徽章产生影响。 我们根据从美国航天局喷气推进实验室获得的资料编制了清单。
|
||||
|
||||
| {% data variables.product.prodname_dotcom %} 仓库 | 版本 | 标记 |
|
||||
| ----------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: 'Using concurrency, expressions, and a test matrix'
|
||||
shortTitle: 'Using concurrency, expressions, and a test matrix'
|
||||
intro: 'How to use advanced {% data variables.product.prodname_actions %} features for continuous integration (CI).'
|
||||
title: 使用并发、表达式和测试矩阵
|
||||
shortTitle: 使用并发、表达式和测试矩阵
|
||||
intro: '如何使用高级 {% data variables.product.prodname_actions %} 功能进行持续集成 (CI)。'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '>= 3.5'
|
||||
@@ -15,21 +15,21 @@ topics:
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
- [Example overview](#example-overview)
|
||||
- [Features used in this example](#features-used-in-this-example)
|
||||
- [示例概述](#example-overview)
|
||||
- [此示例中使用的功能](#features-used-in-this-example)
|
||||
- [示例工作流程](#example-workflow)
|
||||
- [Understanding the example](#understanding-the-example)
|
||||
- [了解示例](#understanding-the-example)
|
||||
- [后续步骤](#next-steps)
|
||||
|
||||
## Example overview
|
||||
## 示例概述
|
||||
|
||||
{% data reusables.actions.example-workflow-intro-ci %} When this workflow is triggered, it tests your code using a matrix of test combinations with `npm test`.
|
||||
{% data reusables.actions.example-workflow-intro-ci %} 触发此工作流程时,它将使用具有 `npm test` 的测试组合矩阵来测试代码。
|
||||
|
||||
{% data reusables.actions.example-diagram-intro %}
|
||||
|
||||

|
||||

|
||||
|
||||
## Features used in this example
|
||||
## 此示例中使用的功能
|
||||
|
||||
{% data reusables.actions.example-table-intro %}
|
||||
|
||||
@@ -41,12 +41,12 @@ topics:
|
||||
{% data reusables.actions.cron-table-entry %}
|
||||
{% data reusables.actions.permissions-table-entry %}
|
||||
{% data reusables.actions.concurrency-table-entry %}
|
||||
| Running the job on different runners, depending on the repository: | [`runs-on`](/actions/using-jobs/choosing-the-runner-for-a-job)|
|
||||
|在不同的运行器上运行作业,具体取决于存储库:| [`runs-on`](/actions/using-jobs/choosing-the-runner-for-a-job)|
|
||||
{% data reusables.actions.if-conditions-table-entry %}
|
||||
| Using a matrix to create different test configurations: | [`matrix`](/actions/using-jobs/using-a-build-matrix-for-your-jobs)|
|
||||
|使用矩阵创建不同的测试配置:| [`matrix`](/actions/using-jobs/using-a-build-matrix-for-your-jobs)|
|
||||
{% data reusables.actions.checkout-action-table-entry %}
|
||||
{% data reusables.actions.setup-node-table-entry %}
|
||||
| Caching dependencies: | [`actions/cache`](/actions/advanced-guides/caching-dependencies-to-speed-up-workflows)| | Running tests on the runner: | `npm test`|
|
||||
| 缓存依赖项:| [`actions/cache`](/actions/advanced-guides/caching-dependencies-to-speed-up-workflows)| | 在运行器上运行测试:| `npm test`|
|
||||
|
||||
## 示例工作流程
|
||||
|
||||
@@ -218,7 +218,7 @@ jobs:
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Understanding the example
|
||||
## 了解示例
|
||||
|
||||
{% data reusables.actions.example-explanation-table-intro %}
|
||||
|
||||
@@ -226,7 +226,7 @@ jobs:
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:60%"><b>代码</b></th>
|
||||
<th style="width:40%"><b>Explanation</b></th>
|
||||
<th style="width:40%"><b>说明</b></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -251,7 +251,7 @@ on:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
The `on` keyword lets you define the events that trigger when the workflow is run. You can define multiple events here. For more information, see "[Triggering a workflow](/actions/using-workflows/triggering-a-workflow#using-events-to-trigger-workflows)."
|
||||
“on”关键字允许您定义在工作流程运行时触发的事件。 您可以在此处定义多个事件。 更多信息请参阅“[触发工作流程](/actions/using-workflows/triggering-a-workflow#using-events-to-trigger-workflows)”。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -263,7 +263,7 @@ The `on` keyword lets you define the events that trigger when the workflow is ru
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Add the `workflow_dispatch` event if you want to be able to manually run this workflow in the UI. For more information, see [`workflow_dispatch`](/actions/reference/events-that-trigger-workflows#workflow_dispatch).
|
||||
如果您希望能够在 UI 中手动运行此工作流程,请添加“workflow_dispatch”事件。 更多信息请参阅 [`workflow_dispatch`](/actions/reference/events-that-trigger-workflows#workflow_dispatch)。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -275,7 +275,7 @@ Add the `workflow_dispatch` event if you want to be able to manually run this wo
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Add the `pull_request` event, so that the workflow runs automatically every time a pull request is created or updated. For more information, see [`pull_request`](/actions/using-workflows/events-that-trigger-workflows#pull_request).
|
||||
添加“pull_request”事件,以便每次创建或更新拉取请求时工作流程自动运行。 更多信息请参阅 [`pull_request`](/actions/using-workflows/events-that-trigger-workflows#pull_request)。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -289,7 +289,7 @@ Add the `pull_request` event, so that the workflow runs automatically every time
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Add the `push` event, so that the workflow runs automatically every time a commit is pushed to a branch matching the filter `gh-readonly-queue/main/**`. For more information, see [`push`](/actions/using-workflows/events-that-trigger-workflows#push).
|
||||
添加 'push' 事件,以便每次将提交推送到与筛选器 'gh-readonly-queue/main/**' 匹配的分支时,工作流程都会自动运行。 更多信息请参阅 [`push`](/actions/using-workflows/events-that-trigger-workflows#push)。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -303,7 +303,7 @@ permissions:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Modifies the default permissions granted to `GITHUB_TOKEN`. This will vary depending on the needs of your workflow. For more information, see "[Assigning permissions to jobs](/actions/using-jobs/assigning-permissions-to-jobs)."
|
||||
修改授予“GITHUB_TOKEN”的默认权限。 这将因工作流程的需求而异。 更多信息请参阅“[为作业分配权限](/actions/using-jobs/assigning-permissions-to-jobs)”。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -317,7 +317,7 @@ concurrency:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Creates a concurrency group for specific events, and uses the `||` operator to define fallback values. For more information, see "[Using concurrency](/actions/using-jobs/using-concurrency)."
|
||||
为特定事件创建并发组,并使用“||' 运算符来定义回退值。 更多信息请参阅“[使用并发](/actions/using-jobs/using-concurrency)”。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -329,7 +329,7 @@ Creates a concurrency group for specific events, and uses the `||` operator to d
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Cancels any currently running job or workflow in the same concurrency group.
|
||||
取消同一并发组中任何当前正在运行的作业或工作流程。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -341,7 +341,7 @@ jobs:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Groups together all the jobs that run in the workflow file.
|
||||
将工作流程文件中运行的所有作业组合在一起。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -353,7 +353,7 @@ Groups together all the jobs that run in the workflow file.
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Defines a job with the ID `test` that is stored within the `jobs` key.
|
||||
定义 ID 为“test”的作业,该作业存储在“jobs”键中。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -365,7 +365,7 @@ Defines a job with the ID `test` that is stored within the `jobs` key.
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Configures the job to run on a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner, depending on the repository running the workflow. In this example, the job will run on a self-hosted runner if the repository is named `docs-internal` and is within the `github` organization. If the repository doesn't match this path, then it will run on an `ubuntu-latest` runner hosted by {% data variables.product.prodname_dotcom %}. For more information on these options see "[Choosing the runner for a job](/actions/using-jobs/choosing-the-runner-for-a-job)."
|
||||
将作业配置为在 {% data variables.product.prodname_dotcom %} 托管的运行器或自托管运行器上运行,具体取决于运行工作流程的存储库。 在此示例中,如果存储库名为“docs-internal”并且位于“github”组织内,则作业将在自托管运行器上运行。 如果存储库与此路径不匹配,则它将在 {% data variables.product.prodname_dotcom %} 托管的“ubuntu-latest”运行器上运行。 有关这些选项的更多信息,请参阅“[为作业选择运行器](/actions/using-jobs/choosing-the-runner-for-a-job)”。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -377,7 +377,7 @@ Configures the job to run on a {% data variables.product.prodname_dotcom %}-host
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Sets the maximum number of minutes to let the job run before it is automatically canceled. For more information, see [`timeout-minutes`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes).
|
||||
设置在自动取消作业之前让作业运行的最大分钟数。 更多信息请参阅 [`timeout-minutes`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes)。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -388,7 +388,7 @@ Sets the maximum number of minutes to let the job run before it is automatically
|
||||
```
|
||||
</td>
|
||||
<td>
|
||||
This section defines the build matrix for your jobs.
|
||||
本节定义作业的生成矩阵。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -400,7 +400,7 @@ Sets the maximum number of minutes to let the job run before it is automatically
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Setting `fail-fast` to `false` prevents {% data variables.product.prodname_dotcom %} from cancelling all in-progress jobs if any matrix job fails.
|
||||
将“fail-fast”设置为“false”可防止 {% data variables.product.prodname_dotcom %} 在任何矩阵作业失败时取消所有正在进行的作业。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -423,7 +423,7 @@ Setting `fail-fast` to `false` prevents {% data variables.product.prodname_dotco
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Creates a matrix named `test-group`, with an array of test groups. These values match the names of test groups that will be run by `npm test`.
|
||||
创建一个名为“test-group”的矩阵,其中包含一个测试组数组。 这些值匹配将由“npm test”运行的测试组名称。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -435,7 +435,7 @@ Creates a matrix named `test-group`, with an array of test groups. These values
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Groups together all the steps that will run as part of the `test` job. Each job in a workflow has its own `steps` section.
|
||||
组合将作为“test”作业一部分运行的所有步骤。 工作流程中的每个作业都有自己的“steps”部分。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -451,7 +451,7 @@ Groups together all the steps that will run as part of the `test` job. Each job
|
||||
</td>
|
||||
<td>
|
||||
|
||||
The `uses` keyword tells the job to retrieve the action named `actions/checkout`. 这是检出仓库并将其下载到运行器的操作,允许针对您的代码运行操作(例如测试工具)。 只要工作流程针对仓库的代码运行,或者您使用仓库中定义的操作,您都必须使用检出操作。 Some extra options are provided to the action using the `with` key.
|
||||
“uses”关键字告诉作业检索名为“actions/checkout”的操作。 这是检出仓库并将其下载到运行器的操作,允许针对您的代码运行操作(例如测试工具)。 只要工作流程针对仓库的代码运行,或者您使用仓库中定义的操作,您都必须使用检出操作。 使用“with”键为操作提供了一些额外的选项。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -491,7 +491,7 @@ The `uses` keyword tells the job to retrieve the action named `actions/checkout`
|
||||
</td>
|
||||
<td>
|
||||
|
||||
If the current repository is the `github/docs-internal` repository, this step uses the `actions/github-script` action to run a script to check if there is a branch called `docs-early-access`.
|
||||
如果当前存储库是“github/docs-internal”存储库,则此步骤使用“actions/github-script”操作来运行脚本以检查是否存在名为“docs-early-access”的分支。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -510,7 +510,7 @@ If the current repository is the `github/docs-internal` repository, this step us
|
||||
</td>
|
||||
<td>
|
||||
|
||||
If the current repository is the `github/docs-internal` repository, this step checks out the branch from the `github/docs-early-access` that was identified in the previous step.
|
||||
如果当前存储库是“github/docs-internal”存储库,则此步骤将从上一步中标识的“github/docs-early-access”中签出分支。
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -527,7 +527,7 @@ If the current repository is the `github/docs-internal` repository, this step ch
|
||||
</td>
|
||||
<td>
|
||||
|
||||
If the current repository is the `github/docs-internal` repository, this step uses the `run` keyword to execute shell commands to move the `docs-early-access` repository's folders into the main repository's folders.
|
||||
如果当前存储库是“github/docs-internal”存储库,则此步骤使用“run”关键字执行shell命令,以将“docs-early-access”存储库的文件夹移动到主存储库的文件夹中。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -540,7 +540,7 @@ If the current repository is the `github/docs-internal` repository, this step us
|
||||
</td>
|
||||
<td>
|
||||
|
||||
This step runs a command to check out LFS objects from the repository.
|
||||
此步骤运行命令以从存储库中签出 LFS 对象。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -559,7 +559,7 @@ This step runs a command to check out LFS objects from the repository.
|
||||
</td>
|
||||
<td>
|
||||
|
||||
This step uses the `trilom/file-changes-action` action to gather the files changed in the pull request, so they can be analyzed in the next step. This example is pinned to a specific version of the action, using the `a6ca26c14274c33b15e6499323aac178af06ad4b` SHA.
|
||||
此步骤使用“trilom/file-changes-action”操作来收集在拉取请求中更改的文件,以便可以在下一步中分析它们。 此示例使用 'a6ca26c14274c33b15e6499323aac178af06ad4b' SHA固定到操作的特定版本。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -573,7 +573,7 @@ This step uses the `trilom/file-changes-action` action to gather the files chang
|
||||
</td>
|
||||
<td>
|
||||
|
||||
This step runs a shell command that uses an output from the previous step to create a file containing the list of files changed in the pull request.
|
||||
此步骤运行 shell 命令,以使用上一步的输出来创建文件,其中包含在拉取请求中更改的文件列表。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -589,7 +589,7 @@ This step runs a shell command that uses an output from the previous step to cre
|
||||
</td>
|
||||
<td>
|
||||
|
||||
This step uses the `actions/setup-node` action to install the specified version of the `node` software package on the runner, which gives you access to the `npm` command.
|
||||
此步骤使用“actions/setup-node”操作在运行器上安装指定版本的“node”软件包,这使您可以访问“npm”命令。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -602,7 +602,7 @@ This step uses the `actions/setup-node` action to install the specified version
|
||||
</td>
|
||||
<td>
|
||||
|
||||
This step runs the `npm ci` shell command to install the npm software packages for the project.
|
||||
此步骤运行 `npm ci` shell 命令来安装项目的 npm 软件包。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -15,21 +15,21 @@ topics:
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
- [Example overview](#example-overview)
|
||||
- [Features used in this example](#features-used-in-this-example)
|
||||
- [示例概述](#example-overview)
|
||||
- [此示例中使用的功能](#features-used-in-this-example)
|
||||
- [示例工作流程](#example-workflow)
|
||||
- [Understanding the example](#understanding-the-example)
|
||||
- [了解示例](#understanding-the-example)
|
||||
- [后续步骤](#next-steps)
|
||||
|
||||
## Example overview
|
||||
## 示例概述
|
||||
|
||||
{% data reusables.actions.example-workflow-intro-ci %} When this workflow is triggered, it automatically runs a script that checks whether the {% data variables.product.prodname_dotcom %} Docs site has any broken links.
|
||||
|
||||
{% data reusables.actions.example-diagram-intro %}
|
||||
|
||||

|
||||

|
||||
|
||||
## Features used in this example
|
||||
## 此示例中使用的功能
|
||||
|
||||
{% data reusables.actions.example-table-intro %}
|
||||
|
||||
@@ -41,7 +41,7 @@ topics:
|
||||
{% data reusables.actions.workflow-dispatch-table-entry %}
|
||||
{% data reusables.actions.permissions-table-entry %}
|
||||
{% data reusables.actions.concurrency-table-entry %}
|
||||
| Running the job on different runners, depending on the repository: | [`runs-on`](/actions/using-jobs/choosing-the-runner-for-a-job)|
|
||||
|在不同的运行器上运行作业,具体取决于存储库:| [`runs-on`](/actions/using-jobs/choosing-the-runner-for-a-job)|
|
||||
{% data reusables.actions.checkout-action-table-entry %}
|
||||
{% data reusables.actions.setup-node-table-entry %}
|
||||
| Using a third-party action: | [`trilom/file-changes-action`](https://github.com/trilom/file-changes-action)| | Running a script on the runner: | Using `./script/rendered-content-link-checker.mjs` |
|
||||
@@ -136,7 +136,7 @@ jobs:
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Understanding the example
|
||||
## 了解示例
|
||||
|
||||
{% data reusables.actions.example-explanation-table-intro %}
|
||||
|
||||
@@ -144,7 +144,7 @@ jobs:
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:60%"><b>代码</b></th>
|
||||
<th style="width:40%"><b>Explanation</b></th>
|
||||
<th style="width:40%"><b>说明</b></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -169,7 +169,7 @@ on:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
The `on` keyword lets you define the events that trigger when the workflow is run. You can define multiple events here. For more information, see "[Triggering a workflow](/actions/using-workflows/triggering-a-workflow#using-events-to-trigger-workflows)."
|
||||
“on”关键字允许您定义在工作流程运行时触发的事件。 您可以在此处定义多个事件。 更多信息请参阅“[触发工作流程](/actions/using-workflows/triggering-a-workflow#using-events-to-trigger-workflows)”。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -195,7 +195,7 @@ Add the `workflow_dispatch` event if you want to be able to manually run this wo
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Add the `push` event, so that the workflow runs automatically every time a commit is pushed to a branch called `main`. For more information, see [`push`](/actions/using-workflows/events-that-trigger-workflows#push).
|
||||
Add the `push` event, so that the workflow runs automatically every time a commit is pushed to a branch called `main`. 更多信息请参阅 [`push`](/actions/using-workflows/events-that-trigger-workflows#push)。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -207,7 +207,7 @@ Add the `push` event, so that the workflow runs automatically every time a commi
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Add the `pull_request` event, so that the workflow runs automatically every time a pull request is created or updated. For more information, see [`pull_request`](/actions/using-workflows/events-that-trigger-workflows#pull_request).
|
||||
添加“pull_request”事件,以便每次创建或更新拉取请求时工作流程自动运行。 更多信息请参阅 [`pull_request`](/actions/using-workflows/events-that-trigger-workflows#pull_request)。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -221,7 +221,7 @@ permissions:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Modifies the default permissions granted to `GITHUB_TOKEN`. This will vary depending on the needs of your workflow. For more information, see "[Assigning permissions to jobs](/actions/using-jobs/assigning-permissions-to-jobs)."
|
||||
修改授予“GITHUB_TOKEN”的默认权限。 这将因工作流程的需求而异。 更多信息请参阅“[为作业分配权限](/actions/using-jobs/assigning-permissions-to-jobs)”。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -236,7 +236,7 @@ concurrency:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Creates a concurrency group for specific events, and uses the `||` operator to define fallback values. For more information, see "[Using concurrency](/actions/using-jobs/using-concurrency)."
|
||||
为特定事件创建并发组,并使用“||' 运算符来定义回退值。 更多信息请参阅“[使用并发](/actions/using-jobs/using-concurrency)”。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -248,7 +248,7 @@ Creates a concurrency group for specific events, and uses the `||` operator to d
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Cancels any currently running job or workflow in the same concurrency group.
|
||||
取消同一并发组中任何当前正在运行的作业或工作流程。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -260,7 +260,7 @@ jobs:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Groups together all the jobs that run in the workflow file.
|
||||
将工作流程文件中运行的所有作业组合在一起。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -286,7 +286,7 @@ Defines a job with the ID `check-links` that is stored within the `jobs` key.
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Configures the job to run on a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner, depending on the repository running the workflow. In this example, the job will run on a self-hosted runner if the repository is named `docs-internal` and is within the `github` organization. If the repository doesn't match this path, then it will run on an `ubuntu-latest` runner hosted by {% data variables.product.prodname_dotcom %}. For more information on these options see "[Choosing the runner for a job](/actions/using-jobs/choosing-the-runner-for-a-job)."
|
||||
将作业配置为在 {% data variables.product.prodname_dotcom %} 托管的运行器或自托管运行器上运行,具体取决于运行工作流程的存储库。 在此示例中,如果存储库名为“docs-internal”并且位于“github”组织内,则作业将在自托管运行器上运行。 如果存储库与此路径不匹配,则它将在 {% data variables.product.prodname_dotcom %} 托管的“ubuntu-latest”运行器上运行。 有关这些选项的更多信息,请参阅“[为作业选择运行器](/actions/using-jobs/choosing-the-runner-for-a-job)”。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -298,7 +298,7 @@ Configures the job to run on a {% data variables.product.prodname_dotcom %}-host
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Groups together all the steps that will run as part of the `check-links` job. Each job in a workflow has its own `steps` section.
|
||||
Groups together all the steps that will run as part of the `check-links` job. 工作流程中的每个作业都有自己的“steps”部分。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -311,7 +311,7 @@ Groups together all the steps that will run as part of the `check-links` job. Ea
|
||||
</td>
|
||||
<td>
|
||||
|
||||
The `uses` keyword tells the job to retrieve the action named `actions/checkout`. 这是检出仓库并将其下载到运行器的操作,允许针对您的代码运行操作(例如测试工具)。 只要工作流程针对仓库的代码运行,或者您使用仓库中定义的操作,您都必须使用检出操作。
|
||||
“uses”关键字告诉作业检索名为“actions/checkout”的操作。 这是检出仓库并将其下载到运行器的操作,允许针对您的代码运行操作(例如测试工具)。 只要工作流程针对仓库的代码运行,或者您使用仓库中定义的操作,您都必须使用检出操作。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -357,7 +357,7 @@ The `run` keyword tells the job to execute a command on the runner. In this case
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Uses the `trilom/file-changes-action` action to gather all the changed files. This example is pinned to a specific version of the action, using the `a6ca26c14274c33b15e6499323aac178af06ad4b` SHA.
|
||||
Uses the `trilom/file-changes-action` action to gather all the changed files. 此示例使用 'a6ca26c14274c33b15e6499323aac178af06ad4b' SHA固定到操作的特定版本。
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Using the GitHub CLI on a runner
|
||||
shortTitle: Using the GitHub CLI on a runner
|
||||
intro: 'How to use advanced {% data variables.product.prodname_actions %} features for continuous integration (CI).'
|
||||
intro: '如何使用高级 {% data variables.product.prodname_actions %} 功能进行持续集成 (CI)。'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '> 3.1'
|
||||
@@ -15,21 +15,21 @@ topics:
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
- [Example overview](#example-overview)
|
||||
- [Features used in this example](#features-used-in-this-example)
|
||||
- [示例概述](#example-overview)
|
||||
- [此示例中使用的功能](#features-used-in-this-example)
|
||||
- [示例工作流程](#example-workflow)
|
||||
- [Understanding the example](#understanding-the-example)
|
||||
- [了解示例](#understanding-the-example)
|
||||
- [后续步骤](#next-steps)
|
||||
|
||||
## Example overview
|
||||
## 示例概述
|
||||
|
||||
{% data reusables.actions.example-workflow-intro-ci %} When this workflow is triggered, it automatically runs a script that checks whether the {% data variables.product.prodname_dotcom %} Docs site has any broken links. If any broken links are found, the workflow uses the {% data variables.product.prodname_dotcom %} CLI to create a {% data variables.product.prodname_dotcom %} issue with the details.
|
||||
|
||||
{% data reusables.actions.example-diagram-intro %}
|
||||
|
||||

|
||||

|
||||
|
||||
## Features used in this example
|
||||
## 此示例中使用的功能
|
||||
|
||||
{% data reusables.actions.example-table-intro %}
|
||||
|
||||
@@ -177,7 +177,7 @@ jobs:
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Understanding the example
|
||||
## 了解示例
|
||||
|
||||
{% data reusables.actions.example-explanation-table-intro %}
|
||||
|
||||
@@ -185,7 +185,7 @@ jobs:
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:60%"><b>代码</b></th>
|
||||
<th style="width:40%"><b>Explanation</b></th>
|
||||
<th style="width:40%"><b>说明</b></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -230,7 +230,7 @@ permissions:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Modifies the default permissions granted to `GITHUB_TOKEN`. This will vary depending on the needs of your workflow. For more information, see "[Assigning permissions to jobs](/actions/using-jobs/assigning-permissions-to-jobs)."
|
||||
修改授予“GITHUB_TOKEN”的默认权限。 这将因工作流程的需求而异。 更多信息请参阅“[为作业分配权限](/actions/using-jobs/assigning-permissions-to-jobs)”。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -242,7 +242,7 @@ jobs:
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Groups together all the jobs that run in the workflow file.
|
||||
将工作流程文件中运行的所有作业组合在一起。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -320,7 +320,7 @@ Groups together all the steps that will run as part of the `check_all_english_li
|
||||
</td>
|
||||
<td>
|
||||
|
||||
The `uses` keyword tells the job to retrieve the action named `actions/checkout`. 这是检出仓库并将其下载到运行器的操作,允许针对您的代码运行操作(例如测试工具)。 只要工作流程针对仓库的代码运行,或者您使用仓库中定义的操作,您都必须使用检出操作。
|
||||
“uses”关键字告诉作业检索名为“actions/checkout”的操作。 这是检出仓库并将其下载到运行器的操作,允许针对您的代码运行操作(例如测试工具)。 只要工作流程针对仓库的代码运行,或者您使用仓库中定义的操作,您都必须使用检出操作。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -336,7 +336,7 @@ The `uses` keyword tells the job to retrieve the action named `actions/checkout`
|
||||
</td>
|
||||
<td>
|
||||
|
||||
This step uses the `actions/setup-node` action to install the specified version of the `node` software package on the runner, which gives you access to the `npm` command.
|
||||
此步骤使用“actions/setup-node”操作在运行器上安装指定版本的“node”软件包,这使您可以访问“npm”命令。
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -45,7 +45,7 @@ miniTocMaxHeadingLevel: 3
|
||||
| `matrix` | `对象` | 包含在工作流程中定义的应用于当前作业的矩阵属性。 更多信息请参阅 [`matrix` 上下文](#matrix-context)。 |
|
||||
| `needs` | `对象` | 包含定义为当前作业依赖项的所有作业的输出。 更多信息请参阅 [`needs` 上下文](#needs-context)。 |
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-4757 %}
|
||||
| `inputs` | `object` | 包含可重用工作流的输入。 更多信息请参阅 [`inputs` 上下文](#inputs-context)。 |{% endif %}
|
||||
| `inputs` | `object` | Contains the inputs of a reusable {% ifversion actions-unified-inputs %}or manually triggered {% endif %}workflow. 更多信息请参阅 [`inputs` 上下文](#inputs-context)。 |{% endif %}
|
||||
|
||||
作为表达式的一部分,您可以使用以下两种语法之一访问上下文信息。
|
||||
|
||||
@@ -699,33 +699,32 @@ jobs:
|
||||
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-4757 %}
|
||||
## `inputs` 上下文
|
||||
|
||||
`inputs` 上下文包含传递给可重用工作流程的输入属性。 输入名称和类型在可重用工作流程的 [`workflow_call` 事件配置](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events)中定义,输入值从调用可重用工作流程的外部工作流中的 [`jobs.<job_id>.with`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idwith) 传递。
|
||||
The `inputs` context contains input properties passed to a reusable workflow{% ifversion actions-unified-inputs %} or to a manually triggered workflow{% endif %}. {% ifversion actions-unified-inputs %}For reusable workflows, the{% else %}The{% endif %} input names and types are defined in the [`workflow_call` event configuration](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events) of a reusable workflow, and the input values are passed from [`jobs.<job_id>.with`](/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idwith) in an external workflow that calls the reusable workflow. {% ifversion actions-unified-inputs %}For manually triggered workflows, the inputs are defined in the [`workflow_dispatch` event configuration](/actions/learn-github-actions/events-that-trigger-workflows#workflow_dispatch) of a workflow.{% endif %}
|
||||
|
||||
`inputs` 上下文中没有标准属性,只有那些在可重用工作流程文件中定义的属性。
|
||||
There are no standard properties in the `inputs` context, only those which are defined in the workflow file.
|
||||
|
||||
{% data reusables.actions.reusable-workflows-ghes-beta %}
|
||||
|
||||
更多信息请参阅“[重用工作流程](/actions/learn-github-actions/reusing-workflows)”。
|
||||
|
||||
| 属性名称 | 类型 | 描述 |
|
||||
| --------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `inputs` | `对象` | 此上下文仅在[可重用的工作流程](/actions/learn-github-actions/reusing-workflows)中可用。 您可以从工作流程中的任何作业或步骤访问此上下文。 此对象包含下面列出的属性。 |
|
||||
| `inputs.<name>` | `string` 或 `number` 或 `boolean` | 从外部工作流传递的每个输入值。 |
|
||||
| 属性名称 | 类型 | 描述 |
|
||||
| --------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `inputs` | `对象` | This context is only available in a [reusable workflow](/actions/learn-github-actions/reusing-workflows){% ifversion actions-unified-inputs %} or in a workflow triggered by the [`workflow_dispatch` event](/actions/learn-github-actions/events-that-trigger-workflows#workflow_dispatch){% endif %}. 您可以从工作流程中的任何作业或步骤访问此上下文。 此对象包含下面列出的属性。 |
|
||||
| `inputs.<name>` | `string` 或 `number` 或 `boolean` | 从外部工作流传递的每个输入值。 |
|
||||
|
||||
### `inputs` 上下文的示例内容
|
||||
|
||||
`inputs` 上下文的以下示例内容来自已定义 `build_id` 和 `deploy_target` 输入的可重用工作流程中的作业。
|
||||
The following example contents of the `inputs` context is from a workflow that has defined the `build_id`, `deploy_target`, and `perform_deploy` inputs.
|
||||
|
||||
```yaml
|
||||
{
|
||||
"build_id": 123456768,
|
||||
"deploy_target": "deployment_sys_1a"
|
||||
"deploy_target": "deployment_sys_1a",
|
||||
"perform_deploy": true
|
||||
}
|
||||
```
|
||||
|
||||
### `inputs` 上下文的示例用法
|
||||
### Example usage of the `inputs` context in a reusable workflow
|
||||
|
||||
此可重用工作流程示例使用 `inputs` 上下文来获取从调用方工作流传递到可重用工作流的 `build_id` 的值和 `deploy_target` 输入。
|
||||
This example reusable workflow uses the `inputs` context to get the values of the `build_id`, `deploy_target`, and `perform_deploy` inputs that were passed to the reusable workflow from the caller workflow.
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
@@ -746,10 +745,42 @@ on:
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ inputs.perform_deploy == 'true' }}
|
||||
if: ${{ inputs.perform_deploy }}
|
||||
steps:
|
||||
- name: Deploy build to target
|
||||
run: deploy --build ${{ inputs.build_id }} --target ${{ inputs.deploy_target }}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% ifversion actions-unified-inputs %}
|
||||
### Example usage of the `inputs` context in a manually triggered workflow
|
||||
|
||||
This example workflow triggered by a `workflow_dispatch` event uses the `inputs` context to get the values of the `build_id`, `deploy_target`, and `perform_deploy` inputs that were passed to the workflow.
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
build_id:
|
||||
required: true
|
||||
type: string
|
||||
deploy_target:
|
||||
required: true
|
||||
type: string
|
||||
perform_deploy:
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ inputs.perform_deploy }}
|
||||
steps:
|
||||
- name: Deploy build to target
|
||||
run: deploy --build ${{ inputs.build_id }} --target ${{ inputs.deploy_target }}
|
||||
```
|
||||
{% endraw %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -17,7 +17,7 @@ versions:
|
||||
|
||||
## 关于重新运行工作流程和作业
|
||||
|
||||
重新运行工作流程{% ifversion re-run-jobs %} 或工作流程中的作业{% endif %} 会使用触发工作流程运行的原始事件的 `GITHUB_SHA`(提交 SHA)和 `GITHUB_REF` (Git ref)。 在初始运行后最长 30 天内,您可以重新运行工作流程{% ifversion re-run-jobs %} 或工作流程中的作业{% endif %}。{% ifversion debug-reruns %} 在重新运行工作流程或工作流程中的作业时,可以为重新运行启用调试日志记录。 这将为重新运行启用运行程序诊断日志记录和步骤调试日志记录。 有关调试日志记录的更多信息,请参阅“[启用调试日志记录](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)”。{% endif %}
|
||||
重新运行工作流程{% ifversion re-run-jobs %} 或工作流程中的作业{% endif %} 会使用触发工作流程运行的原始事件的 `GITHUB_SHA`(提交 SHA)和 `GITHUB_REF` (Git ref)。 You can re-run a workflow{% ifversion re-run-jobs %} or jobs in a workflow{% endif %} for up to 30 days after the initial run.{% ifversion re-run-jobs %} You cannot re-run jobs in a workflow once its logs have passed their retention limits. For more information, see "[Usage limits, billing, and administration](/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy)."{% endif %}{% ifversion debug-reruns %} When you re-run a workflow or jobs in a workflow, you can enable debug logging for the re-run. 这将为重新运行启用运行程序诊断日志记录和步骤调试日志记录。 有关调试日志记录的更多信息,请参阅“[启用调试日志记录](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)”。{% endif %}
|
||||
|
||||
## 重新运行工作流程中的所有作业
|
||||
|
||||
@@ -139,7 +139,7 @@ gh run rerun --job <em>job-id</em> --debug
|
||||
|
||||
{% ifversion partial-reruns-with-reusable %}
|
||||
|
||||
## Re-running workflows and jobs with reusable workflows
|
||||
## 使用可重用工作流程重新运行工作流程和作业
|
||||
|
||||
{% data reusables.actions.partial-reruns-with-reusable %}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ shortTitle: Remove workflow artifacts
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning:** Once you delete an artifact, it can not be restored.
|
||||
**Warning:** Once you delete an artifact, it cannot be restored.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
|
||||
@@ -1250,12 +1250,13 @@ on: workflow_dispatch
|
||||
|
||||
#### 提供输入
|
||||
|
||||
您可以直接在工作流程中配置事件的自定义输入属性、默认输入值和必要输入。 触发事件时,可以提供 `ref` 和任何 `inputs`。 当工作流程运行时,您可以访问 `github.event.inputs` 上下文中的输入值。 更多信息请参阅“[上下文](/actions/learn-github-actions/contexts)”。
|
||||
您可以直接在工作流程中配置事件的自定义输入属性、默认输入值和必要输入。 触发事件时,可以提供 `ref` 和任何 `inputs`。 When the workflow runs, you can access the input values in the {% ifversion actions-unified-inputs %}`inputs`{% else %}`github.event.inputs`{% endif %} context. 更多信息请参阅“[上下文](/actions/learn-github-actions/contexts)”。
|
||||
|
||||
{% data reusables.actions.inputs-vs-github-event-inputs %}
|
||||
|
||||
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %}
|
||||
此示例定义了称为 `logLevel`、`tags` 和 `environment` 的输入。 在运行工作流程时,可以将这些输入的值传递给工作流程。 然后,此工作流程使用 `github.event.inputs.logLevel`、`github.event.inputs.tags` 和 `github.event.inputs.environment` 上下文属性,将值输出到日志中。
|
||||
此示例定义了称为 `logLevel`、`tags` 和 `environment` 的输入。 在运行工作流程时,可以将这些输入的值传递给工作流程。 This workflow then prints the values to the log, using the {% ifversion actions-unified-inputs %}`inputs.logLevel`, `inputs.tags`, and `inputs.environment`{% else %}`github.event.inputs.logLevel`, `github.event.inputs.tags`, and `github.event.inputs.environment`{% endif %} context properties.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -1287,11 +1288,10 @@ jobs:
|
||||
echo "Tags: $TAGS"
|
||||
echo "Environment: $ENVIRONMENT"
|
||||
env:
|
||||
LEVEL: ${{ github.event.inputs.logLevel }}
|
||||
TAGS: ${{ github.event.inputs.tags }}
|
||||
ENVIRONMENT: ${{ github.event.inputs.environment }}
|
||||
LEVEL: {% ifversion actions-unified-inputs %}{% raw %}${{ inputs.logLevel }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.logLevel }}{% endraw %}{% endif %}
|
||||
TAGS: {% ifversion actions-unified-inputs %}{% raw %}${{ inputs.tags }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.tags }}{% endraw %}{% endif %}
|
||||
ENVIRONMENT: {% ifversion actions-unified-inputs %}{% raw %}${{ inputs.environment }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.environment }}{% endraw %}{% endif %}
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
如果从浏览器运行此工作流程,则必须在工作流程运行之前手动输入所需输入的值。
|
||||
|
||||
@@ -1306,7 +1306,7 @@ gh workflow run run-tests.yml -f logLevel=warning -f tags=false -f environment=s
|
||||
更多信息请参阅“[手动运行工作流程](/actions/managing-workflow-runs/manually-running-a-workflow)”中的 {% data variables.product.prodname_cli %} 信息。
|
||||
|
||||
{% else %}
|
||||
此示例定义了 `name` 和 `home` 输入,并使用 `github.event.inputs.name` 和 `github.event.inputs.home` 上下文打印。 如果未提供 `home` ,则打印默认值“The Octoverse”。
|
||||
This example defines the `name` and `home` inputs and prints them using the {% ifversion actions-unified-inputs %}`inputs.name` and `inputs.home`{% else %}`github.event.inputs.name` and `github.event.inputs.home`{% endif %} contexts. 如果未提供 `home` ,则打印默认值“The Octoverse”。
|
||||
|
||||
```yaml
|
||||
name: Manually triggered workflow
|
||||
@@ -1330,8 +1330,8 @@ jobs:
|
||||
echo Hello $NAME!
|
||||
echo -in $HOME
|
||||
env:
|
||||
NAME: {% raw %}${{ github.event.inputs.name }}{% endraw %}
|
||||
HOME: {% raw %}${{ github.event.inputs.home }}{% endraw %}
|
||||
NAME: {% ifversion actions-unified-inputs %}{% raw %}${{ inputs.name }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.name }}{% endraw %}{% endif %}
|
||||
HOME: {% ifversion actions-unified-inputs %}{% raw %}${{ github.event.inputs.home }}{% endraw %}{% else %}{% raw %}${{ github.event.inputs.home }}{% endraw %}{% endif %}
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: GitHub Enterprise 的许可证使用疑难解答
|
||||
intro: 您可以通过审核许可证报告来排查企业的许可证使用问题。
|
||||
title: Troubleshooting license usage for GitHub Enterprise
|
||||
intro: 'You can troubleshoot license usage for your enterprise by auditing license reports.'
|
||||
permissions: 'Enterprise owners can review license usage for {% data variables.product.prodname_enterprise %}.'
|
||||
versions:
|
||||
ghec: '*'
|
||||
@@ -9,37 +9,37 @@ type: how_to
|
||||
topics:
|
||||
- Enterprise
|
||||
- Licensing
|
||||
shortTitle: 排查许可证使用问题
|
||||
shortTitle: Troubleshoot license usage
|
||||
---
|
||||
|
||||
## 关于意外的许可证使用
|
||||
## About unexpected license usage
|
||||
|
||||
如果企业使用的许可证数量不符合预期,可以查看已使用的许可证报告,以审核所有企业部署和订阅中的许可证使用情况。 如果发现错误,可以尝试排查步骤。 有关查看许可证使用情况的详细信息,请参阅“[查看 GitHub Enterprise 的许可证使用情况](/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise)”和“[查看企业帐户的订阅和使用情况](/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account)”。
|
||||
If the number of consumed licenses for your enterprise is unexpected, you can review your consumed license report to audit your license usage across all your enterprise deployments and subscriptions. If you find errors, you can try troubleshooting steps. For more information about viewing your license usage, see "[Viewing license usage for GitHub Enterprise](/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise)" and "[Viewing the subscription and usage for your enterprise account](/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account)."
|
||||
|
||||
出于隐私原因,企业所有者无法直接访问用户帐户的详细信息。
|
||||
For privacy reasons, enterprise owners cannot directly access the details of user accounts.
|
||||
|
||||
## 关于已用许可证的计算
|
||||
## About the calculation of consumed licenses
|
||||
|
||||
{% data variables.product.company_short %} 对使用 {% data variables.product.prodname_ghe_server %} 部署的每个人、{% data variables.product.prodname_ghe_cloud %} 组织的成员或 {% data variables.product.prodname_vs_subscriber %} 计费。 有关企业中计为使用许可证的人员的详细信息,请参阅“[关于每用户定价](/billing/managing-billing-for-your-github-account/about-per-user-pricing)”。
|
||||
{% data variables.product.company_short %} bills for each person who uses deployments of {% data variables.product.prodname_ghe_server %}, is a member of an organization on {% data variables.product.prodname_ghe_cloud %}, or is a {% data variables.product.prodname_vs_subscriber %}. For more information about the people in your enterprise who are counted as consuming a license, see "[About per-user pricing](/billing/managing-billing-for-your-github-account/about-per-user-pricing)."
|
||||
|
||||
{% data reusables.enterprise-licensing.about-license-sync %}
|
||||
|
||||
## 已使用的许可文件中的字段
|
||||
## Fields in the consumed license files
|
||||
|
||||
The {% data variables.product.prodname_dotcom_the_website %} license usage report and {% data variables.product.prodname_ghe_server %} exported license usage file include a variety of fields to help you troubleshoot license usage for your enterprise.
|
||||
The {% data variables.product.prodname_dotcom_the_website %} license usage report and {% data variables.product.prodname_ghe_server %} exported license usage file include a variety of fields to help you troubleshoot license usage for your enterprise.
|
||||
### {% data variables.product.prodname_dotcom_the_website %} license usage report (CSV file)
|
||||
|
||||
The license usage report for your enterprise is a CSV file that contains the following information about members of your enterprise. Some fields are specific to your {% data variables.product.prodname_ghe_cloud %} (GHEC) deployment, {% data variables.product.prodname_ghe_server %} (GHES) connected environments, or your {% data variables.product.prodname_vs %} subscriptions (VSS) with GitHub Enterprise.
|
||||
|
||||
| 字段 | 描述 |
|
||||
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 名称 | First and last name for the user's account on GHEC. |
|
||||
| Handle or email | GHEC username, or the email address associated with the user's account on GHES. |
|
||||
| Profile link | Link to the {% data variables.product.prodname_dotcom_the_website %} profile page for the user's account on GHEC. |
|
||||
| License type | 可以是以下之一: `Visual Studio 订阅` 或 `Enterprise`。 |
|
||||
| 许可证状态 | Identifies if a user account on {% data variables.product.prodname_dotcom_the_website %} successfully matched either a {% data variables.product.prodname_vs_subscriber %} or GHES user.<br><br>Can be one of: `Matched`, `Pending Invitation`, `Server Only`, blank. |
|
||||
| Member roles | For each of the organizations the user belongs to on GHEC, the organization name and the person's role in that organization (`Owner` or `Member`) separated by a colon<br><br>Each organization is delimited by a comma. |
|
||||
| 企业角色 | Can be one of: `Owner` or `Member`. |
|
||||
| Field | Description
|
||||
| ----- | -----------
|
||||
| Name | First and last name for the user's account on GHEC.
|
||||
| Handle or email | GHEC username, or the email address associated with the user's account on GHES.
|
||||
| Profile link | Link to the {% data variables.product.prodname_dotcom_the_website %} profile page for the user's account on GHEC.
|
||||
| License type | Can be one of: `Visual Studio subscription` or `Enterprise`.
|
||||
| License status | Identifies if a user account on {% data variables.product.prodname_dotcom_the_website %} successfully matched either a {% data variables.product.prodname_vs_subscriber %} or GHES user.<br><br>Can be one of: `Matched`, `Pending Invitation`, `Server Only`, blank.
|
||||
| Member roles | For each of the organizations the user belongs to on GHEC, the organization name and the person's role in that organization (`Owner` or `Member`) separated by a colon<br><br>Each organization is delimited by a comma.
|
||||
| Enterprise role | Can be one of: `Owner` or `Member`.
|
||||
|
||||
{% data variables.product.prodname_vs_subscriber %}s who are not yet members of at least one organization in your enterprise will be included in the report with a pending invitation status, and will be missing values for the "Name" or "Profile link" field.
|
||||
|
||||
@@ -47,15 +47,15 @@ The license usage report for your enterprise is a CSV file that contains the fol
|
||||
|
||||
Your {% data variables.product.prodname_ghe_server %} license usage is a JSON file that is typically used when performing a manual sync of user licenses between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %} deployments. The file contains the following information specific to your {% data variables.product.prodname_ghe_server %} environment.
|
||||
|
||||
| 字段 | 描述 |
|
||||
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 功能 | The {% data variables.product.prodname_github_connect %} features that are enabled on your {% data variables.product.prodname_ghe_server %} instance, and the date and time of enablement. |
|
||||
| Host name | The hostname of your {% data variables.product.prodname_ghe_server %} instance. |
|
||||
| HTTP only | Whether Transport Layer Security (TLS) is enabled and configured on your {% data variables.product.prodname_ghe_server %} instance. Can be one of: `True` or `False`. |
|
||||
| 许可 | {% data variables.product.prodname_ghe_server %} 许可的哈希. |
|
||||
| Public key | {% data variables.product.prodname_ghe_server %} 许可的公钥部分. |
|
||||
| Server ID | UUID generated for your {% data variables.product.prodname_ghe_server %} instance. |
|
||||
| 版本 | The version of your {% data variables.product.prodname_ghe_server %} instance. |
|
||||
| Field | Description
|
||||
| ----- | -----------
|
||||
| Features | The {% data variables.product.prodname_github_connect %} features that are enabled on your {% data variables.product.prodname_ghe_server %} instance, and the date and time of enablement.
|
||||
| Host name | The hostname of your {% data variables.product.prodname_ghe_server %} instance.
|
||||
| HTTP only | Whether Transport Layer Security (TLS) is enabled and configured on your {% data variables.product.prodname_ghe_server %} instance. Can be one of: `True` or `False`.
|
||||
| License | A hash of your {% data variables.product.prodname_ghe_server %} license.
|
||||
| Public key | The public key portion of your {% data variables.product.prodname_ghe_server %} license.
|
||||
| Server ID | UUID generated for your {% data variables.product.prodname_ghe_server %} instance.
|
||||
| Version | The version of your {% data variables.product.prodname_ghe_server %} instance.
|
||||
|
||||
## Troubleshooting consumed licenses
|
||||
|
||||
@@ -72,7 +72,7 @@ When attempting to match users across enterprises, {% data variables.product.com
|
||||
Your license usage is recalculated shortly after each license sync is performed. You can view the timestamp of the last license sync job, and, if a job hasn't run since an email address was updated or verified, to resolve an issue with your consumed license report you can manually trigger one. For more information, see "[Syncing license usage between GitHub Enterprise Server and GitHub Enterprise Cloud](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)."
|
||||
|
||||
{% ifversion ghec or ghes > 3.1 %}
|
||||
If your enterprise uses verified domains, review the list of enterprise members who do not have an email address from a verified domain associated with their {% data variables.product.prodname_dotcom_the_website %} account. Often, these are the users who erroneously consume more than one licensed seat. 更多信息请参阅“[查看来自已验证域的电子邮件地址的成员](/admin/user-management/managing-users-in-your-enterprise/viewing-people-in-your-enterprise#viewing-members-without-an-email-address-from-a-verified-domain)”。
|
||||
If your enterprise uses verified domains, review the list of enterprise members who do not have an email address from a verified domain associated with their {% data variables.product.prodname_dotcom_the_website %} account. Often, these are the users who erroneously consume more than one licensed seat. For more information, see "[Viewing members without an email address from a verified domain](/admin/user-management/managing-users-in-your-enterprise/viewing-people-in-your-enterprise#viewing-members-without-an-email-address-from-a-verified-domain)."
|
||||
{% endif %}
|
||||
|
||||
{% note %}
|
||||
|
||||
@@ -280,6 +280,10 @@ updates:
|
||||
prefix-development: "pip dev"
|
||||
include: "scope"
|
||||
```
|
||||
If you use the same configuration as in the example above, bumping the `requests` library in the `pip` development dependency group will generate a commit message of:
|
||||
|
||||
`pip dev: bump requests from 1.0.0 to 1.0.1`
|
||||
|
||||
### `ignore`
|
||||
|
||||
{% data reusables.dependabot.default-dependencies-allow-ignore %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: GitHub Desktop
|
||||
shortTitle: GitHub Desktop
|
||||
intro: 'With GitHub Desktop, you can interact with GitHub using a GUI instead of the command line or a web browser. You can use GitHub Desktop to complete most Git commands from your desktop, such as pushing to, pulling from, and cloning remote repositories, attributing commits, and creating pull requests, with visual confirmation of changes.'
|
||||
intro: 使用 GitHub Desktop,您可以使用 GUI 而不是命令行或 Web 浏览器与 GitHub 进行交互。 您可以使用 GitHub Desktop 从桌面完成大多数 Git 命令,例如推送到、拉取远程存储库和克隆远程存储库、归因提交和创建拉取请求,以及直观地确认更改。
|
||||
introLinks:
|
||||
overview: /desktop/installing-and-configuring-github-desktop/overview/getting-started-with-github-desktop
|
||||
featuredLinks:
|
||||
|
||||
@@ -66,4 +66,4 @@ shortTitle: 使用 HTTPS 保护站点
|
||||
|:----------:|:----------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------:|
|
||||
| CSS | `<link rel="stylesheet" href="http://example.com/css/main.css">` | `<link rel="stylesheet" href="https://example.com/css/main.css">` |
|
||||
| JavaScript | `<script type="text/javascript" src="http://example.com/js/main.js"></script>` | `<script type="text/javascript" src="https://example.com/js/main.js"></script>` |
|
||||
| 图像 | `<A HREF="http://www.somesite.com"><IMG SRC="http://www.example.com/logo.jpg" alt="Logo"></a>` | `<A HREF="https://www.somesite.com"><IMG SRC="https://www.example.com/logo.jpg" alt="Logo"></a>` |
|
||||
| 图像 | `<a href="http://www.somesite.com"><img src="http://www.example.com/logo.jpg" alt="Logo"></a>` | `<a href="https://www.somesite.com"><img src="https://www.example.com/logo.jpg" alt="Logo"></a>` |
|
||||
|
||||
@@ -25,4 +25,4 @@ children:
|
||||
- /getting-started-with-the-checks-api
|
||||
---
|
||||
|
||||
文档的这一部分旨在让您使用实际 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 应用程序开始运行。 我们将涵盖您需要知道的一切,从身份验证到操作结果,再到将结果与其他应用程序相结合。 这里的每个教程都包含一个项目,并且每个项目都将存储在我们的公共[平台样本](https://github.com/github/platform-samples)仓库中并形成文档。 
|
||||
文档的这一部分旨在让您使用实际 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 应用程序开始运行。 We'll go over everything you need to know, from authentication to results manipulation to integrating results with other apps. Every tutorial will include a project, and each project will be saved and documented in our public [platform-samples](https://github.com/github/platform-samples) repository. 
|
||||
|
||||
@@ -21,7 +21,7 @@ versions:
|
||||
|
||||
### 液体条件
|
||||
|
||||
现在您可以在内容文件中使用 `{% if meow %} ... {% endif %}`! 请注意,这是 `if` 标记,而不是新的 `ifversion` 标记。
|
||||
现在您可以在内容文件中使用 `{% ifversion meow %} ... {% endif %}`!
|
||||
|
||||
### 前辅文
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
#Issue 6921
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.6'
|
||||
ghae: 'issue-6921'
|
||||
@@ -0,0 +1,8 @@
|
||||
{% ifversion actions-unified-inputs %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: The workflow will also receive the inputs in the `github.event.inputs` context. The information in the `inputs` context and `github.event.inputs` context is identical except that the `inputs` context preserves Boolean values as Booleans instead of converting them to strings.
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
@@ -1,6 +1,8 @@
|
||||
When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow.
|
||||
|
||||
触发的工作流程接收 `github.event.input` 上下文中的输入。 更多信息请参阅“[上下文](/actions/learn-github-actions/contexts#github-context)”。
|
||||
The triggered workflow receives the inputs in the {% ifversion actions-unified-inputs %}`inputs`{% else %}`github.event.inputs`{% endif %} context. For more information, see "[Contexts]({% ifversion actions-unified-inputs %}/actions/learn-github-actions/contexts#inputs-context{% else %}/actions/learn-github-actions/contexts#github-context{% endif %})."
|
||||
|
||||
{% data reusables.actions.inputs-vs-github-event-inputs %}
|
||||
|
||||
```yaml
|
||||
on:
|
||||
@@ -31,8 +33,8 @@ on:
|
||||
jobs:
|
||||
print-tag:
|
||||
runs-on: ubuntu-latest
|
||||
if: {% raw %} ${{ github.event.inputs.print_tags == 'true' }} {% endraw %}
|
||||
if: {% ifversion actions-unified-inputs %}{% raw %} ${{ inputs.print_tags }} {% endraw %}{% else %}{% raw %} ${{ github.event.inputs.print_tags == 'true' }} {% endraw %}{% endif %}
|
||||
steps:
|
||||
- name: Print the input tag to STDOUT
|
||||
run: echo {% raw %} The tags are ${{ github.event.inputs.tags }} {% endraw %}
|
||||
run: {% ifversion actions-unified-inputs %}echo {% raw %} The tags are ${{ inputs.tags }} {% endraw %}{% else %}echo {% raw %} The tags are ${{ github.event.inputs.tags }} {% endraw %}{% endif %}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user