Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Dec 30, 2020
1 parent f34f2dc commit 6a59c21
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55271,9 +55271,15 @@ async function removeRunner() {
const runner = await getRunner(config.input.label);
const octokit = github.getOctokit(config.input.githubToken);

// skip the runner removal process if the runner is not found
if (!runner) {
core.info(`GitHub self-hosted runner with label ${config.input.label} is not found, so the removal is skipped`);
return;
}

try {
await octokit.request('DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}', _.merge(config.githubContext, { runner_id: runner.id }));
core.info('GitHub self-hosted runner is removed');
core.info(`GitHub self-hosted runner ${runner.name} is removed`);
return;
} catch (error) {
core.error('GitHub self-hosted runner removal error');
Expand Down

0 comments on commit 6a59c21

Please sign in to comment.