Skip to content
pols.so docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

pols runner

Run self-hosted GitHub Actions runners in sandboxes

Run the official GitHub Actions runner (github.com/actions/runner) in a sandbox that stays awake for jobs, as a systemd service. GitHub credentials stay on this machine: pols asks GitHub for a short-lived registration or removal token with gh’s login, GITHUB_TOKEN or --token, and passes only that token into the sandbox.

Usage

pols runner [command]

Subcommands

Command Description
pols runner add Create or reuse a sandbox kept awake and register a runner in it
pols runner ls List the runners in the org’s running sandboxes kept awake
pols runner rm Deregister a sandbox’s runner from GitHub and let the sandbox sleep, or delete it

Flags

-h, --help   help for runner

pols runner add

Create a sandbox (or reuse the one of that name), keep it out of standby so it is there when jobs come, install the official actions/runner 2.338.2 after checking its SHA-256, register it with the repository or org and start it as a systemd service. Its labels are self-hosted, Linux, X64, pols and any --label (pols-SIZE is left to pols’s managed per-job runners). A public repository is refused unless --allow-public is given: pull requests from forks may run code on the runner. A sandbox kept awake is billed as running all the time; pols prints what that costs. Running it again is harmless, and registers the runner again when its name or labels changed.

Usage

pols runner add (--repo OWNER/REPO | --org ORG) [flags]

Examples

pols runner add --repo acme/web
pols runner add --org acme --size large --name acme-big
pols runner add --repo acme/web --label gpu-free --token "$TOKEN"

Flags

    --allow-public        register a runner for a public repository, where pull requests from forks may run code on it
-h, --help                help for add
    --label stringArray   another label for the runner (repeatable)
    --name string         name of the sandbox and the runner (default runner- and the repository or org)
    --org string          the org to serve, for all its repositories (the token needs admin:org)
    --repo string         the repository to serve, OWNER/REPO
    --size string         size of a new sandbox: small, default, large or xlarge (default small)
    --token string        GitHub token to ask for the registration token with (default gh's login, else GITHUB_TOKEN)

pols runner ls

List the runners in the org’s running sandboxes kept awake

Usage

pols runner ls [flags]

Flags

-h, --help   help for ls

pols runner rm

Stop the runner’s service, deregister it from GitHub with a short-lived removal token, and turn keep-awake off so the sandbox may go to standby again; with --delete-sandbox, delete the sandbox too.

Usage

pols runner rm SANDBOX [flags]

Examples

pols runner rm runner-acme-web
pols runner rm runner-acme-web --delete-sandbox

Flags

    --delete-sandbox   delete the sandbox too
-h, --help             help for rm
    --token string     GitHub token to ask for the removal token with (default gh's login, else GITHUB_TOKEN)

The global flags work with this command too.