Skip to content

Commit

Permalink
ci: fix test.yml retry job
Browse files Browse the repository at this point in the history
  • Loading branch information
uhobeike committed May 13, 2024
1 parent feeddb6 commit 5749acb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,22 @@ jobs:
const workflow_id = context.workflow.id;
const ref = context.ref;
const run_id = context.runId;
const workflow_run = await github.actions.getWorkflowRun({
const workflow_run = await github.rest.actions.getWorkflowRun({
owner,
repo,
run_id
});
if (workflow_run.data.conclusion === 'failure' &&
workflow_run.data.status === 'completed' &&
workflow_run.data.run_attempt < 10) {
await github.actions.createWorkflowDispatch({
await github.rest.actions.createWorkflowDispatch({
owner,
repo,
workflow_id,
ref
});
}
}
run();
run();

0 comments on commit 5749acb

Please sign in to comment.