File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 35
35
const failure_regex = /Process completed with exit code 1./
36
36
const preemption_regex = /The runner has received a shutdown signal/
37
37
38
+ const wf_run = context.payload.workflow_run
39
+ core.notice(`Running on "${wf_run.display_title}" by @${wf_run.actor.login} (event: ${wf_run.event})\nWorkflow run URL: ${wf_run.html_url}`)
40
+
38
41
console.log('Listing check runs for suite')
39
42
const check_suites = await github.rest.checks.listForSuite({
40
43
owner: context.repo.owner,
@@ -83,19 +86,19 @@ jobs:
83
86
if (failure_match != null) {
84
87
// We only want to restart the workflow if all of the failures were due to preemption.
85
88
// We don't want to restart the workflow if there were other failures.
86
- console.log ('Choosing not to rerun workflow because we found a non-preemption failure');
87
- console.log( 'Failure message: ' + annotation.message);
89
+ core.notice ('Choosing not to rerun workflow because we found a non-preemption failure' +
90
+ 'Failure message: " ' + annotation.message + '"' );
88
91
return;
89
92
}
90
93
}
91
94
}
92
95
93
96
if (!has_preempted_job) {
94
- console.log ('No preempted jobs found. Not restarting workflow.');
97
+ core.notice ('No preempted jobs found. Not restarting workflow.');
95
98
return;
96
99
}
97
100
98
- console.log ("Restarted workflow: " + context.payload.workflow_run.id);
101
+ core.notice ("Restarted workflow: " + context.payload.workflow_run.id);
99
102
await github.rest.actions.reRunWorkflowFailedJobs({
100
103
owner: context.repo.owner,
101
104
repo: context.repo.repo,
You can’t perform that action at this time.
0 commit comments