FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
wordpress-develop/.github/workflows/failed-workflow.yml at trunk · ericmann/wordpress-develop · GitHub
ericmann
/
wordpress-develop
Public
forked from
WordPress/wordpress-develop
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
wordpress-develop
/
.github
/
workflows
/
failed-workflow.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
56 lines (50 loc) · 1.63 KB
Breadcrumbs
wordpress-develop
/
.github
/
workflows
/
failed-workflow.yml
Copy path
File metadata and controls
56 lines (50 loc) · 1.63 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
#
#
Performs follow-up tasks when a workflow fails or is cancelled.
#
#
name
:
Failed Workflow
on
:
workflow_dispatch
:
inputs
:
run_id
:
description
:
'
ID of the GitHub Action workflow run to rerun
'
required
:
true
type
:
'
string
'
#
Disable permissions for all available scopes by default.
#
Any needed permissions should be configured at the job level.
permissions
:
{}
jobs
:
#
Attempts to rerun a workflow.
#
#
Performs the following steps:
#
- Retrieves the workflow run that dispatched this workflow.
#
- Restarts all failed jobs when the workflow fails or is cancelled for the first time.
failed-workflow
:
name
:
Rerun a workflow
runs-on
:
ubuntu-24.04
permissions
:
actions
:
write
timeout-minutes
:
30
steps
:
-
name
:
Rerun a workflow
uses
:
actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3
#
v9.0.0
with
:
retries
:
15
retry-exempt-status-codes
:
418
script
:
|
const workflow_run = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: process.env.RUN_ID,
});
// Only rerun after the first run attempt.
if ( workflow_run.data.run_attempt > 1 ) {
return;
}
const rerun = await github.rest.actions.reRunWorkflowFailedJobs({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: process.env.RUN_ID,
enable_debug_logging:
true
});
env
:
RUN_ID
:
${{ inputs.run_id }}
Back
|
FazBrowse Home
|
New Git URL