You came here from the screen you left, and it is still open behind you. Back to the screen you left
Setting up · page 14 of 29
Run your own runner
In 30 seconds
- Who needs it: only teams that let DoneMark send the agents. Judging pull requests needs no runner at all, and DoneMark never hosts one.
- You do: prepare a Linux machine, register two or three GitHub runners with the same label, type it in Settings → Runs on, and merge the pull request the setup line opens.
- Still yours: DoneMark never rewrites your own test workflows, so change their
runs-on:yourself. Keep updates from restarting the runner, and clean up on a schedule.
Only for teams that let DoneMark send the agents. Judging pull requests needs no runner at all. DoneMark never hosts a runner: you run one on a machine of yours and tell DoneMark its label. The code is written by the agent you chose, with your key, on that machine.
1. Prepare a machine
- Linux (Ubuntu 24.04 is what we test on), about 4 CPUs, 8 GB of memory and 80 GB of disk.
- Docker with compose, git 2.32 or newer, and curl. If your checks take pictures, Chrome and Playwright's system packages, installed once by an administrator.
- Run the runner as its own user, without administrator rights, with its own Docker. It runs code an agent wrote.
- Your app's install no longer sees the job's environment or PATH: it gets only your package registry, package index, certificate and proxy settings, and the folders where your tools were when the job began, plus the system's own
/usr/bin,/bin,/usr/sbinand/sbin. - The agent runs as the same user as the runner. An agent written to do harm could read the job's GitHub token while the job runs. That token lasts only for the job and reaches only this repository. Running the agent as a separate user is planned.
2. Register a GitHub runner
On GitHub: your repository's Settings → Actions → Runners → New self-hosted runner. GitHub shows the commands to download it and register it with a one-time token. Give it a label of your own, for example my-app-runner, and install it as a service.
Register two or three runners with the same label. DoneMark's runner holds one for hours, asking for work every thirty seconds; the others run your tests.
3. Tell DoneMark
- In the project's Settings → Runs on, type the label. Settings then shows whether a runner with that label is online and when it last asked for work.
- Run the setup line from the project's Built page and merge the pull request it opens. Saving the label alone changes nothing: this pull request is what moves DoneMark's runner onto your machine.
- DoneMark never rewrites your own test workflows. Change their
runs-on:to[self-hosted, my-app-runner]yourself, and merge. On a runner without administrator rights, install Playwright without--with-deps.
Three things to set on the machine
- Updates must not restart the runner. On Ubuntu, tell
needrestartnever to restart services namedactions.runner.*, or a security update stops an agent mid-work. - Clean up. Prune old Docker builds and the runners' temporary folders on a schedule, or the disk fills.
- Switching back to GitHub's machines: clear the label in Settings and run the setup line again.