Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo sync #18196

Merged
merged 2 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions translations/log/cn-resets.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-r
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,broken liquid tags
translations/zh-CN/content/actions/learn-github-actions/usage-limits-billing-and-administration.md,broken liquid tags
translations/zh-CN/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md,rendering error
translations/zh-CN/content/actions/managing-workflow-runs/removing-workflow-artifacts.md,broken liquid tags
translations/zh-CN/content/actions/managing-workflow-runs/reviewing-deployments.md,Listed in localization-support#489
translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md,broken liquid tags
Expand Down Expand Up @@ -345,14 +344,14 @@ translations/zh-CN/data/reusables/dependabot/dependabot-alerts-dependency-graph-
translations/zh-CN/data/reusables/dependabot/enterprise-enable-dependabot.md,broken liquid tags
translations/zh-CN/data/reusables/dotcom_billing/downgrade-org-to-free.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-accounts/emu-password-reset-session.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md,rendering error
translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-licensing/about-license-sync.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_installation/hardware-considerations-all-platforms.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_installation/hardware-rec-table.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_installation/upgrade-hardware-requirements.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_management_console/badge_indicator.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/enterprise-accounts.md,rendering error
translations/zh-CN/data/reusables/gated-features/enterprise-accounts.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/packages.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/secret-scanning.md,broken liquid tags
translations/zh-CN/data/reusables/getting-started/actions.md,broken liquid tags
Expand All @@ -373,9 +372,9 @@ translations/zh-CN/data/reusables/repositories/deleted_forks_from_private_reposi
translations/zh-CN/data/reusables/repositories/enable-security-alerts.md,broken liquid tags
translations/zh-CN/data/reusables/repositories/github-reviews-security-advisories.md,broken liquid tags
translations/zh-CN/data/reusables/repositories/select-marketplace-apps.md,broken liquid tags
translations/zh-CN/data/reusables/saml/saml-session-oauth.md,rendering error
translations/zh-CN/data/reusables/saml/saml-session-oauth.md,broken liquid tags
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,Listed in localization-support#489
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,rendering error
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,broken liquid tags
translations/zh-CN/data/reusables/scim/after-you-configure-saml.md,broken liquid tags
translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md,broken liquid tags
translations/zh-CN/data/reusables/security-advisory/link-browsing-advisory-db.md,broken liquid tags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ topics:
redirect_from:
- /github/setting-up-and-managing-your-github-user-account/managing-the-default-branch-name-for-your-repositories
- /github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories
shortTitle: Manage default branch name
---
## About management of the default branch name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ runs:
```
{% endif %}

#### `runs.steps[*].continue-on-error`

**Optional** Prevents the action from failing when a step fails. Set to `true` to allow the action to pass when this step fails.

## 用于 Docker 容器操作的 `runs`

**必要** 配置用于 Docker 容器操作的图像。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Re-running workflows and jobs
intro: You can re-run a workflow run{% if re-run-jobs %}, all failed jobs in a workflow run, or specific jobs in a workflow run{% endif %} up to 30 days after its initial run.
title: 重新运行工作流程和作业
intro: '您可以工作流程运行初始运行后最长 30 天内重新运行工作流程运行{% if re-run-jobs %}、工作流程运行中所有失败的作业或工作流程运行中的特定作业{% endif %}。'
permissions: People with write permissions to a repository can re-run workflows in the repository.
miniTocMaxHeadingLevel: 3
redirect_from:
Expand All @@ -15,11 +15,11 @@ versions:
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

## About re-running workflows and jobs
## 关于重新运行工作流程和作业

Re-running a workflow{% if re-run-jobs %} or jobs in a workflow{% endif %} uses the same `GITHUB_SHA` (commit SHA) and `GITHUB_REF` (Git ref) of the original event that triggered the workflow run. You can re-run a workflow{% if re-run-jobs %} or jobs in a workflow{% endif %} for up to 30 days after the initial run.
重新运行工作流程{% if re-run-jobs %} 或工作流程中的作业{% endif %} 会使用触发工作流程运行的原始事件的 `GITHUB_SHA`(提交 SHA)和 `GITHUB_REF` (Git ref)You can re-run a workflow{% if re-run-jobs %} or jobs in a workflow{% endif %} for up to 30 days after the initial run.{% if debug-reruns %} When you re-run a workflow or jobs in a workflow, you can enable debug logging for the re-run. This will enable runner diagnostic logging and step debug logging for the re-run. For more information about debug logging, see "[Enabling debug logging](/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)."{% endif %}

## Re-running all the jobs in a workflow
## 重新运行工作流程中的所有作业

{% webui %}

Expand All @@ -28,29 +28,37 @@ Re-running a workflow{% if re-run-jobs %} or jobs in a workflow{% endif %} uses
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
{% ifversion fpt or ghes > 3.4 or ghae-issue-4721 or ghec %}
1. In the upper-right corner of the workflow, use the **Re-run jobs** drop-down menu, and select **Re-run all jobs**.
1. 在工作流程的右上角,使用 **Re-run jobs(重新运行作业)**下拉菜单,并选择 **Re-run all jobs(重新运行所有作业)**。

If no jobs failed, you will not see the **Re-run jobs** drop-down menu. Instead, click **Re-run all jobs**.
![Rerun checks drop-down menu](/assets/images/help/repository/rerun-checks-drop-down.png)
如果没有作业失败,您将不会看到 **重新运行作业(Re-run jobs)**下拉菜单。 相反,请单击 **Re-run all jobs(重新运行所有作业)**。 ![重新运行检查下拉菜单](/assets/images/help/repository/rerun-checks-drop-down.png)
{% endif %}
{% ifversion ghes < 3.5 or ghae %}
1. In the upper-right corner of the workflow, use the **Re-run jobs** drop-down menu, and select **Re-run all jobs**.
![Re-run checks drop-down menu](/assets/images/help/repository/rerun-checks-drop-down-updated.png)
1. 在工作流程的右上角,使用 **Re-run jobs(重新运行作业)**下拉菜单,并选择 **Re-run all jobs(重新运行所有作业)**。 ![重新运行检查下拉菜单](/assets/images/help/repository/rerun-checks-drop-down-updated.png)
{% endif %}
{% data reusables.actions.enable-debug-logging %}

{% endwebui %}

{% cli %}

{% data reusables.cli.cli-learn-more %}

To re-run a failed workflow run, use the `run rerun` subcommand. Replace `run-id` with the ID of the failed run that you want to re-run. If you don't specify a `run-id`, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a recent failed run.
要重新运行失败的工作流程运行,请使用 `run rerun` 子命令。 将 `run-id` 替换为您想要重新运行的已失败运行的 ID。 如果您没有指定 `run-id`{% data variables.product.prodname_cli %} 将返回一个交互式菜单,供您选择最近失败的运行。

```shell
gh run rerun <em>run-id</em>
```

To view the progress of the workflow run, use the `run watch` subcommand and select the run from the interactive list.
{% if debug-reruns %}
{% data reusables.actions.enable-debug-logging-cli %}

```shell
gh run rerun <em>run-id</em> --debug
```

{% endif %}

要查看工作流程运行的进度,请使用 `run watch` 子命令,并从交互式列表中选择运行。

```shell
gh run watch
Expand All @@ -59,77 +67,90 @@ gh run watch
{% endcli %}

{% if re-run-jobs %}
## Re-running failed jobs in a workflow
## 重新运行工作流程中失败的作业

If any jobs in a workflow run failed, you can re-run just the jobs that failed. When you re-run failed jobs in a workflow, a new workflow run will start for all failed jobs and their dependents. Any outputs for any successful jobs in the previous workflow run will be used for the re-run. Any artifacts that were created in the initial run will be available in the re-run. Any environment protection rules that passed in the previous run will automatically pass in the re-run.
如果工作流程运行中的任何作业失败,您可以仅重新运行失败的作业。 在重新运行工作流程中失败的作业时,将为所有失败的作业及其依赖项启动新的工作流程运行。 上一个工作流程运行中任何成功作业的任何输出都将用于重新运行。 在初始运行中创建的任何构件都将在重新运行中可用。 在上一次运行中通过的任何环境保护规则都将自动在重新运行中通过。

{% webui %}

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
1. In the upper-right corner of the workflow, use the **Re-run jobs** drop-down menu, and select **Re-run failed jobs**.
![Re-run failed jobs drop-down menu](/assets/images/help/repository/rerun-failed-jobs-drop-down.png)
1. 在工作流程的右上角,使用 **Re-run jobs(重新运行作业)**下拉菜单,并选择 **Re-run failed jobs(重新运行失败的作业)**。 ![重新运行失败的作业下拉菜单](/assets/images/help/repository/rerun-failed-jobs-drop-down.png)
{% data reusables.actions.enable-debug-logging %}

{% endwebui %}

{% cli %}

To re-run failed jobs in a workflow run, use the `run rerun` subcommand with the `--failed` flag. Replace `run-id` with the ID of the run for which you want to re-run failed jobs. If you don't specify a `run-id`, {% data variables.product.prodname_cli %} returns an interactive menu for you to choose a recent failed run.
要重新运行工作流程运行中失败的作业,请使用 `run rerun` 子命令与 `--failed` 标志。 将 `run-id` 替换为要为其重新运行失败作业的运行 ID。 如果您没有指定 `run-id`{% data variables.product.prodname_cli %} 将返回一个交互式菜单,供您选择最近失败的运行。

```shell
gh run rerun <em>run-id</em> --failed
```

{% if debug-reruns %}
{% data reusables.actions.enable-debug-logging-cli %}

```shell
gh run rerun <em>run-id</em> --failed --debug
```

{% endif %}
{% endcli %}

## Re-running a specific job in a workflow
## 重新运行工作流程中的特定作业

When you re-run a specific job in a workflow, a new workflow run will start for the job and any dependents. Any outputs for any other jobs in the previous workflow run will be used for the re-run. Any artifacts that were created in the initial run will be available in the re-run. Any environment protection rules that passed in the previous run will automatically pass in the re-run.
重新运行工作流程中的特定作业时,将为该作业和任何依赖项启动新的工作流程运行。 上一个工作流程运行中任何其他作业的任何输出都将用于重新运行。 在初始运行中创建的任何构件都将在重新运行中可用。 在上一次运行中通过的任何环境保护规则都将自动在重新运行中通过。

{% webui %}

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
1. Next to the job that you want to re-run, click {% octicon "sync" aria-label="The re-run icon" %}.
![Re-run selected job](/assets/images/help/repository/re-run-selected-job.png)
1. 在要重新运行的作业旁边,单击 {% octicon "sync" aria-label="The re-run icon" %}。 ![重新运行选定的作业](/assets/images/help/repository/re-run-selected-job.png)

Alternatively, click on a job to view the log. In the log, click {% octicon "sync" aria-label="The re-run icon" %}.
![Re-run selected job](/assets/images/help/repository/re-run-single-job-from-log.png)
或者,单击作业以查看日志。 在日志中,单击 {% octicon "sync" aria-label="The re-run icon" %}。 ![重新运行选定的作业](/assets/images/help/repository/re-run-single-job-from-log.png)
{% data reusables.actions.enable-debug-logging %}

{% endwebui %}

{% cli %}

To re-run a specific job in a workflow run, use the `run rerun` subcommand with the `--job` flag. Replace `job-id` with the ID of the job that you want to re-run.
要重新运行工作流程运行中的特定作业,请使用 `run rerun` 子命令与 `--job` 标志。 将 `job-id` 替换为您想要重新运行的作业的 ID。

```shell
gh run rerun --job <em>job-id</em>
```

{% if debug-reruns %}
{% data reusables.actions.enable-debug-logging-cli %}

```shell
gh run rerun --job <em>job-id</em> --debug
```

{% endif %}
{% endcli %}

{% endif %}

{% ifversion fpt or ghes > 3.4 or ghae-issue-4721 or ghec %}
## Reviewing previous workflow runs
## 查看以前的工作流程运行

You can view the results from your previous attempts at running a workflow. You can also view previous workflow runs using the API. For more information, see ["Get a workflow run"](/rest/reference/actions#get-a-workflow-run).
您可以查看以前尝试运行工作流程的结果。 您还可以使用 API 查看以前的工作流程运行。 更多信息请参阅“[获取工作流程运行](/rest/reference/actions#get-a-workflow-run)”。

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
{%- if re-run-jobs %}
1. Any previous run attempts are shown in the **Latest** drop-down menu.
![Previous run attempts](/assets/images/help/repository/previous-run-attempts.png)
1. 任何以前的运行尝试都显示在 **Latest(最新)**下拉菜单中。 ![以前的运行尝试](/assets/images/help/repository/previous-run-attempts.png)
{%- else %}
1. Any previous run attempts are shown in the left pane.
![Rerun workflow](/assets/images/help/settings/actions-review-workflow-rerun.png)
1. 任何以前的运行尝试都显示在左窗格中。 ![重新运行工作流程](/assets/images/help/settings/actions-review-workflow-rerun.png)
{%- endif %}
1. Click an entry to view its results.
1. 单击某个条目以查看其结果。

{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ versions:

有关设置密码的更多信息,请参阅“[创建和使用加密密码](/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)”。

{% if debug-reruns %}

Additionally, anyone who has access to run a workflow can enable runner diagnostic logging and step debug logging for a workflow re-run. For more information, see "[Re-running workflows and jobs](/actions/managing-workflow-runs/re-running-workflows-and-jobs)."

{% endif %}

## 启用运行程序诊断日志

Runner diagnostic logging provides additional log files that contain information about how a runner is executing a job. 两个额外的日志文件被添加到日志存档中:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ steps:
- name: Decrypt large secret
run: ./.github/scripts/decrypt_secret.sh
env:
LARGE_SECRET_PASSPHRASE: {% raw %}${{ secrets. LARGE_SECRET_PASSPHRASE }}{% endraw %}
LARGE_SECRET_PASSPHRASE: {% raw %}${{ secrets.LARGE_SECRET_PASSPHRASE }}{% endraw %}
# This command is just an example to show your secret being printed
# Ensure you remove any print statements of your secrets. GitHub does
# not hide secrets that use this workaround.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ When you call a reusable workflow, you can only use the following keywords in th
* [`jobs.<job_id>.needs`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds)
* [`jobs.<job_id>.if`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idif)
* [`jobs.<job_id>.permissions`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idpermissions)
* [`jobs.<job_id>.concurrency`](/actions/reference/workflow-syntax-for-github-actions#concurrency)

{% note %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,16 @@ Action | Description
| `secret_scanning.disable` | An organization owner disabled secret scanning for all existing{% ifversion ghec %} private or internal{% endif %} repositories. For more information, see "[About secret scanning](/github/administering-a-repository/about-secret-scanning)."
| `secret_scanning.enable` | An organization owner enabled secret scanning for all existing{% ifversion ghec %} private or internal{% endif %} repositories.

{% if secret-scanning-alert-audit-log %}
### `secret_scanning_alert` category actions

| Action | Description
|------------------|-------------------
| `secret_scanning_alert.create` | {% data variables.product.prodname_dotcom %} detected a secret and created a {% data variables.product.prodname_secret_scanning %} alert. For more information, see "[Managing alerts from {% data variables.product.prodname_secret_scanning %}](/code-security/secret-scanning/managing-alerts-from-secret-scanning)."
| `secret_scanning_alert.reopen` | A user reopened a {% data variables.product.prodname_secret_scanning %} alert.
| `secret_scanning_alert.resolve` | A user resolved a {% data variables.product.prodname_secret_scanning %} alert.
{% endif %}

### `secret_scanning_new_repos` category actions

| Action | Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ topics:

可以通过从企业审核日志下载 JSON 文件来导出 Git 事件数据。 与审核日志数据不同,您无法在审核日志用户界面中查询要筛选和导出的特定 Git 事件。

{% data reusables.audit_log.git-events-export-limited %}

{% data reusables.audit_log.exported-log-keys-and-values %}

作为导出日志事件的替代方法,您可以使用 API 检索审核日志事件,或设置 {% data variables.product.product_name %} 以在记录事件时流式传输审核数据。 更多信息请参阅“[对企业使用审核日志 API](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise)”和“[流式传输企业的审核日志](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise)”。
Expand Down
Loading