Skip to content

Commit f93a693

Browse files
authored
Added another try/catch block
1 parent f40e9cd commit f93a693

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

dist/index.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,16 @@ async function run() {
186186
continue;
187187
}
188188

189-
await octokit.actions.deleteWorkflowRun({
190-
owner: repo_owner,
191-
repo: repo_name,
192-
run_id: del.id
193-
});
189+
try {
190+
await octokit.actions.deleteWorkflowRun({
191+
owner: repo_owner,
192+
repo: repo_name,
193+
run_id: del.id
194+
});
195+
}
196+
catch (error) {
197+
core.setFailed(error.message);
198+
}
194199

195200
console.log(`🚀 Delete run ${del.id} of '${workflow.name}' workflow`);
196201
}

0 commit comments

Comments
 (0)