Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## [1.4.1](https://github.com/zama-ai/slab-github-runner/compare/v1.4.0...v1.4.1) (2024-12-20)


### Bug Fixes

* **action:** set action as failed on start error ([95337e0](https://github.com/zama-ai/slab-github-runner/commit/95337e06e8537240757a8ac1eae469cfba00d1c7))
- **action:** set action as failed on start error
([95337e0](https://github.com/zama-ai/slab-github-runner/commit/95337e06e8537240757a8ac1eae469cfba00d1c7))

# [1.4.0](https://github.com/zama-ai/slab-github-runner/compare/v1.3.0...v1.4.0) (2024-12-13)

Expand Down
9 changes: 6 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions src/gh.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@ const utils = require('./utils')
// it's not possible to get it in any other way.
async function getRunner(label) {
const octokit = github.getOctokit(config.input.githubToken)
let runners = []

try {
const runners = await octokit.paginate(
runners = await octokit.paginate(
'GET /repos/{owner}/{repo}/actions/runners',
{
owner: config.githubContext.owner,
repo: config.githubContext.repo
}
)
const foundRunners = _.filter(runners, { name: label })
return foundRunners.length > 0 ? foundRunners[0] : null
} catch (error) {
core.error(`Failed to fetch runners: ${error.message}`)
return null
}

const foundRunners = _.filter(runners, { name: label })
return foundRunners.length > 0 ? foundRunners[0] : null
}

async function waitForRunnerRegistered(label) {
Expand Down
Loading