Runbook: GitHub self-hosted runner for the on-demand harness (HARN-OD, TD-043)¶
Why: the harness then runs within seconds of an issue being labelled agent:harness, or when an agent asks for a run, instead of once an hour. The workflow .github/workflows/harness-on-demand.yml is merged and stays inert until step 9.
Time: about 10 minutes, on the laptop, as yourself (not an administrator account, unless Windows asks).
- GitHub → https://github.com/moneymarche-dev/MMDEP → Settings → Actions → Runners → New self-hosted runner.
- Choose Windows and x64. GitHub shows three blocks of PowerShell commands: Download, Configure, Run. Keep that page open; its token is valid for one hour.
- Open PowerShell and run the Download block as shown. It creates
C:\actions-runnerand unpacks the runner there. - Run the Configure block (
./config.cmd --url … --token …). Answer the questions: - Runner group: press Enter (Default).
- Runner name:
laptop. - Additional labels:
mmdep-harness. - Work folder: press Enter (
_work). - Run as service?
Y. - User account for the service: your own Windows account (for example
.\Atul Jain, or the account name shown bywhoami), then your Windows password. The harness needs your account, because your API keys live in your user environment. - If you'd rather not run it as a service: answer
N, then runC:\actions-runner\run.cmdafter each sign-in. Optional: a shortcut to it in the Startup folder (shell:startup). - Back on the GitHub Runners page, refresh: laptop shows Idle with the labels
self-hosted, Windows, X64, mmdep-harness. - Optional: so the runner finds the right MMDEP copy, set a user environment variable
MMDEP_REPO=C:\Projects\MoneyMarche-Labs\mmdep. The workflow uses that path anyway when the variable isn't set. - Restart the runner service once, so it sees your current environment (keys):
Restart-Service "actions.runner.*"(PowerShell as administrator), or reboot. - GitHub → MMDEP → Settings → Secrets and variables → Actions → Variables tab → New repository variable. Name
HARNESS_RUNNER, valueon. - Test: GitHub → Actions → harness-on-demand → Run workflow (leave "issue" empty). A run starts on laptop and finishes green in a few minutes; the harness's result appears on the control branch (
harness/LATEST.md). Then tap Done on HARN-OD.
To pause it: set HARNESS_RUNNER to off. To remove it: cd C:\actions-runner ; ./config.cmd remove (GitHub shows the removal token on the runner's page).
Safety:
- The workflow starts only for issues labelled agent:harness, opened by you or the repository's collaborators, or for a manual dispatch.
- It never checks out pull-request code from outsiders.
- One run at a time.