From aacb0199fa106a6365f8b4205d5ddeb288b77a15 Mon Sep 17 00:00:00 2001 From: Hu Yueh-Wei Date: Tue, 7 Jan 2025 18:16:44 +0800 Subject: [PATCH] chore: update github action yml --- .github/workflows/cancel_on_merged.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cancel_on_merged.yml b/.github/workflows/cancel_on_merged.yml index 78cdab438..b2d0a1ff4 100644 --- a/.github/workflows/cancel_on_merged.yml +++ b/.github/workflows/cancel_on_merged.yml @@ -21,7 +21,7 @@ jobs: console.log(`Cancelling workflows related to PR #${prNumber} (SHA: ${headSha})`); // Retrieve all workflow runs associated with the head SHA of the PR. - const runs = await github.actions.listWorkflowRunsForRepo({ + const runs = await octokit.actions.listWorkflowRunsForRepo({ owner, repo, head_sha: headSha, @@ -36,7 +36,7 @@ jobs: // Cancel all related workflow runs. for (const run of runs.data.workflow_runs) { console.log(`Cancel workflow run: ${run.id} (${run.name})`); - await github.actions.cancelWorkflowRun({ + await octokit.actions.cancelWorkflowRun({ owner, repo, run_id: run.id,