Skip to content

Commit a5a39d8

Browse files
committed
Fix release workflow failure
1 parent b882b71 commit a5a39d8

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/build-common.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,21 @@ jobs:
325325
with:
326326
result-encoding: string
327327
script: |
328-
const { data: workflow_run } = await github.rest.actions.listJobsForWorkflowRun({
329-
owner: context.repo.owner,
330-
repo: context.repo.repo,
331-
run_id: context.runId,
332-
per_page: 100
333-
});
328+
const workflow_jobs_nested = await github.paginate(
329+
github.rest.actions.listJobsForWorkflowRun,
330+
{
331+
owner: context.repo.owner,
332+
repo: context.repo.repo,
333+
run_id: context.runId,
334+
per_page: 100
335+
},
336+
(response) => {
337+
return response.data.jobs;
338+
},
339+
);
334340
const matrix = JSON.parse(process.env.matrix);
335341
const job_name = `common / test${ matrix['test-partition'] } (${ matrix['test-java-version'] }, ${ matrix.vm })`;
336-
return workflow_run.jobs.find((job) => job.name === job_name).html_url;
342+
return workflow_jobs_nested.flat().find((job) => job.name === job_name).html_url;
337343
338344
- name: Flaky test report
339345
if: ${{ !cancelled() }}

0 commit comments

Comments
 (0)