Skip to content

Commit

Permalink
fix runner wait
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad committed Apr 17, 2024
1 parent 88099b7 commit 289ddd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,9 @@ function start() {
const hasInstance = instances.filter((i) => { var _a; return ((_a = i.State) === null || _a === void 0 ? void 0 : _a.Name) === "running"; }).length > 0;
if (hasInstance) {
core.info(`Runner already running. Continuing as we can target it with jobs.`);
yield ghClient.pollForRunnerCreation([config.githubJobId]);
if (!ghClient.hasRunner([config.githubJobId])) {
yield ghClient.pollForRunnerCreation([config.githubJobId]);
}
return;
}
var instanceId = "";
Expand Down
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ async function start() {
core.info(
`Runner already running. Continuing as we can target it with jobs.`
);
await ghClient.pollForRunnerCreation([config.githubJobId]);
if (!ghClient.hasRunner([config.githubJobId])) {
await ghClient.pollForRunnerCreation([config.githubJobId]);
}
return;
}
var instanceId = "";
Expand Down

0 comments on commit 289ddd6

Please sign in to comment.