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: content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md
+62-5Lines changed: 62 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Re-running workflows and jobs
3
-
intro: You can re-run a workflow run up to 30 days after its initial run.
3
+
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.
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,9 +15,11 @@ versions:
15
15
{% data reusables.actions.enterprise-beta %}
16
16
{% data reusables.actions.enterprise-github-hosted-runners %}
17
17
18
-
## Re-running all the jobs in a workflow
18
+
## About re-running workflows and jobs
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.
19
21
20
-
Re-running a workflow 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 for up to 30 days after the initial run.
22
+
## Re-running all the jobs in a workflow
21
23
22
24
{% webui %}
23
25
@@ -26,7 +28,9 @@ Re-running a workflow uses the same `GITHUB_SHA` (commit SHA) and `GITHUB_REF` (
26
28
{% data reusables.repositories.navigate-to-workflow %}
27
29
{% data reusables.repositories.view-run %}
28
30
{% ifversion fpt or ghes > 3.2 or ghae-issue-4721 or ghec %}
29
-
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. In the upper-right corner of the workflow, use the **Re-run jobs** drop-down menu, and select **Re-run all jobs**.
32
+
33
+
If no jobs failed, you will not see the **Re-run jobs** drop-down menu. Instead, click **Re-run all jobs**.
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.
65
+
66
+
{% webui %}
67
+
68
+
{% data reusables.repositories.navigate-to-repo %}
69
+
{% data reusables.repositories.actions-tab %}
70
+
{% data reusables.repositories.navigate-to-workflow %}
71
+
{% data reusables.repositories.view-run %}
72
+
1. In the upper-right corner of the workflow, use the **Re-run jobs** drop-down menu, and select **Re-run failed jobs**.
73
+

74
+
75
+
{% endwebui %}
76
+
77
+
{% cli %}
78
+
79
+
You cannot re-run all failed jobs through the {% data variables.product.prodname_cli %} at this time. Instead, use the {% data variables.product.product_name %} web browser interface.
80
+
81
+
{% endcli %}
82
+
83
+
## Re-running a specific job in a workflow
84
+
85
+
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.
86
+
87
+
{% webui %}
88
+
89
+
{% data reusables.repositories.navigate-to-repo %}
90
+
{% data reusables.repositories.actions-tab %}
91
+
{% data reusables.repositories.navigate-to-workflow %}
92
+
{% data reusables.repositories.view-run %}
93
+
1. Next to the job that you want to re-run, click {% octicon "sync" aria-label="The re-run icon" %}.
You cannot re-run a single job through the {% data variables.product.prodname_cli %} at this time. Instead, use the {% data variables.product.product_name %} browser interface.
104
+
105
+
{% endcli %}
106
+
107
+
{% endif %}
108
+
57
109
{% ifversion fpt or ghes > 3.2 or ghae-issue-4721 or ghec %}
58
-
###Reviewing previous workflow runs
110
+
## Reviewing previous workflow runs
59
111
60
112
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).
61
113
62
114
{% data reusables.repositories.navigate-to-repo %}
63
115
{% data reusables.repositories.actions-tab %}
64
116
{% data reusables.repositories.navigate-to-workflow %}
65
117
{% data reusables.repositories.view-run %}
118
+
{%- if re-run-jobs %}
119
+
1. Any previous run attempts are shown in the **Latest** drop-down menu.
120
+

121
+
{%- else %}
66
122
1. Any previous run attempts are shown in the left pane.
**Note**: When you download the log archive for a workflow that was partially re-run, the archive only includes the jobs that were re-run. To get a complete set of logs for jobs that were run from a workflow, you must download the log archives for the previous run attempts that ran the other jobs.
71
+
72
+
{% endnote %}
73
+
74
+
{% endif %}
75
+
66
76
## Deleting logs
67
77
68
78
You can delete the log files from your workflow run. {% data reusables.repositories.permissions-statement-write %}
0 commit comments