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 3535 const failure_regex = /Process completed with exit code 1./
3636 const preemption_regex = /The runner has received a shutdown signal/
3737
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+
3841 console.log('Listing check runs for suite')
3942 const check_suites = await github.rest.checks.listForSuite({
4043 owner: context.repo.owner,
@@ -83,19 +86,19 @@ jobs:
8386 if (failure_match != null) {
8487 // We only want to restart the workflow if all of the failures were due to preemption.
8588 // 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 + '"' );
8891 return;
8992 }
9093 }
9194 }
9295
9396 if (!has_preempted_job) {
94- console.log ('No preempted jobs found. Not restarting workflow.');
97+ core.notice ('No preempted jobs found. Not restarting workflow.');
9598 return;
9699 }
97100
98- console.log ("Restarted workflow: " + context.payload.workflow_run.id);
101+ core.notice ("Restarted workflow: " + context.payload.workflow_run.id);
99102 await github.rest.actions.reRunWorkflowFailedJobs({
100103 owner: context.repo.owner,
101104 repo: context.repo.repo,
You can’t perform that action at this time.
0 commit comments