You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-the-default-branch-name-for-your-repositories.md
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.
2
+
title: 重新运行工作流程和作业
3
+
intro: '您可以工作流程运行初始运行后最长 30 天内重新运行工作流程运行{% if re-run-jobs %}、工作流程运行中所有失败的作业或工作流程运行中的特定作业{% endif %}。'
4
4
permissions: People with write permissions to a repository can re-run workflows in the repository.
5
5
miniTocMaxHeadingLevel: 3
6
6
redirect_from:
@@ -15,11 +15,11 @@ versions:
15
15
{% data reusables.actions.enterprise-beta %}
16
16
{% data reusables.actions.enterprise-github-hosted-runners %}
17
17
18
-
## About re-running workflows and jobs
18
+
## 关于重新运行工作流程和作业
19
19
20
-
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.
20
+
重新运行工作流程{% 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 %}
21
21
22
-
## Re-running all the jobs in a workflow
22
+
## 重新运行工作流程中的所有作业
23
23
24
24
{% webui %}
25
25
@@ -28,29 +28,37 @@ Re-running a workflow{% if re-run-jobs %} or jobs in a workflow{% endif %} uses
28
28
{% data reusables.repositories.navigate-to-workflow %}
29
29
{% data reusables.repositories.view-run %}
30
30
{% ifversion fpt or ghes > 3.4 or ghae-issue-4721 or ghec %}
31
-
1.In the upper-right corner of the workflow, use the **Re-run jobs** drop-down menu, and select **Re-run all jobs**.
31
+
1.在工作流程的右上角,使用 **Re-run jobs(重新运行作业)**下拉菜单,并选择 **Re-run all jobs(重新运行所有作业)**。
32
32
33
-
If no jobs failed, you will not see the **Re-run jobs** drop-down menu. Instead, click **Re-run all jobs**.
1. 在工作流程的右上角,使用 **Re-run jobs(重新运行作业)**下拉菜单,并选择 **Re-run all jobs(重新运行所有作业)**。 
39
37
{% endif %}
38
+
{% data reusables.actions.enable-debug-logging %}
40
39
41
40
{% endwebui %}
42
41
43
42
{% cli %}
44
43
45
44
{% data reusables.cli.cli-learn-more %}
46
45
47
-
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.
To view the progress of the workflow run, use the `run watch` subcommand and select the run from the interactive list.
52
+
{% if debug-reruns %}
53
+
{% data reusables.actions.enable-debug-logging-cli %}
54
+
55
+
```shell
56
+
gh run rerun <em>run-id</em> --debug
57
+
```
58
+
59
+
{% endif %}
60
+
61
+
要查看工作流程运行的进度,请使用 `run watch` 子命令,并从交互式列表中选择运行。
54
62
55
63
```shell
56
64
gh run watch
@@ -59,77 +67,90 @@ gh run watch
59
67
{% endcli %}
60
68
61
69
{% if re-run-jobs %}
62
-
## Re-running failed jobs in a workflow
70
+
## 重新运行工作流程中失败的作业
63
71
64
-
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.
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.
{% data reusables.actions.enable-debug-logging-cli %}
95
+
96
+
```shell
97
+
gh run rerun <em>run-id</em> --failed --debug
98
+
```
99
+
100
+
{% endif %}
85
101
{% endcli %}
86
102
87
-
## Re-running a specific job in a workflow
103
+
## 重新运行工作流程中的特定作业
88
104
89
-
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.
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.
{% data reusables.actions.enable-debug-logging-cli %}
130
+
131
+
```shell
132
+
gh run rerun --job <em>job-id</em> --debug
133
+
```
134
+
135
+
{% endif %}
113
136
{% endcli %}
114
137
115
138
{% endif %}
116
139
117
140
{% ifversion fpt or ghes > 3.4 or ghae-issue-4721 or ghec %}
118
-
## Reviewing previous workflow runs
141
+
## 查看以前的工作流程运行
119
142
120
-
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).
143
+
您可以查看以前尝试运行工作流程的结果。 您还可以使用 API 查看以前的工作流程运行。 更多信息请参阅“[获取工作流程运行](/rest/reference/actions#get-a-workflow-run)”。
121
144
122
145
{% data reusables.repositories.navigate-to-repo %}
123
146
{% data reusables.repositories.actions-tab %}
124
147
{% data reusables.repositories.navigate-to-workflow %}
125
148
{% data reusables.repositories.view-run %}
126
149
{%- if re-run-jobs %}
127
-
1. Any previous run attempts are shown in the **Latest** drop-down menu.
128
-

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)."
28
+
29
+
{% endif %}
30
+
25
31
## 启用运行程序诊断日志
26
32
27
33
Runner diagnostic logging provides additional log files that contain information about how a runner is executing a job. 两个额外的日志文件被添加到日志存档中:
Copy file name to clipboardExpand all lines: translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1199,6 +1199,16 @@ Action | Description
1199
1199
| `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)."
1200
1200
| `secret_scanning.enable` | An organization owner enabled secret scanning for all existing{% ifversion ghec %} private or internal{% endif %} repositories.
1201
1201
1202
+
{% if secret-scanning-alert-audit-log %}
1203
+
### `secret_scanning_alert` category actions
1204
+
1205
+
| Action | Description
1206
+
|------------------|-------------------
1207
+
| `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)."
1208
+
| `secret_scanning_alert.reopen` | A user reopened a {% data variables.product.prodname_secret_scanning %} alert.
1209
+
| `secret_scanning_alert.resolve` | A user resolved a {% data variables.product.prodname_secret_scanning %} alert.
Copy file name to clipboardExpand all lines: translations/zh-CN/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/exporting-audit-log-activity-for-your-enterprise.md
{% data reusables.audit_log.git-events-export-limited %}
23
+
22
24
{% data reusables.audit_log.exported-log-keys-and-values %}
23
25
24
26
作为导出日志事件的替代方法,您可以使用 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)”。
0 commit comments