@@ -290,19 +290,37 @@ jobs:
290290 if : ${{ !cancelled() && hashFiles('build-scan.txt') != '' }}
291291 run : cat build-scan.txt
292292
293+ # - name: Get current job url
294+ # uses: Tiryoh/gha-jobid-action@be260d8673c9211a84cdcf37794ebd654ba81eef # v1.4.0
295+ # id: jobs
296+ # if: ${{ !cancelled() }}
297+ # with:
298+ # job_name: "common / test${{ matrix.test-partition }} (${{ matrix.test-java-version }}, ${{ matrix.vm }})"
299+ # per_page: 100 # input matrix size here if it is larger than 30
300+
293301 - name : Get current job url
294- uses : Tiryoh/gha-jobid-action@be260d8673c9211a84cdcf37794ebd654ba81eef # v1.4.0
295302 id : jobs
296303 if : ${{ !cancelled() }}
304+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
305+ env :
306+ matrix : ${{ toJson(matrix) }}
297307 with :
298- job_name : " common / test${{ matrix.test-partition }} (${{ matrix.test-java-version }}, ${{ matrix.vm }})"
299- per_page : 100 # input matrix size here if it is larger than 30
308+ script : |
309+ const { data: workflow_run } = await github.rest.actions.listJobsForWorkflowRun({
310+ owner: context.repo.owner,
311+ repo: context.repo.repo,
312+ run_id: context.runId
313+ });
314+ const matrix = JSON.parse(process.env.matrix);
315+ const job_name = `common / test${ matrix.test-partition } (${ matrix.test-java-version }, ${ matrix.vm })`;
316+ return workflow_run.jobs.find((job) => job.name === job_name).html_url;
300317
301318 - name : Flaky test report
302319 if : ${{ !cancelled() }}
303320 env :
304321 FLAKY_TEST_REPORTER_ACCESS_KEY : ${{ secrets.FLAKY_TEST_REPORTER_ACCESS_KEY }}
305- JOB_URL : ${{ steps.jobs.outputs.html_url }}
322+ JOB_URL : ${{ steps.jobs.outputs.result }}
323+ # JOB_URL: ${{ steps.jobs.outputs.html_url }}
306324 run : |
307325 if [ -s build-scan.txt ]; then
308326 export BUILD_SCAN_URL=$(cat build-scan.txt)
0 commit comments