Skip to content

macOS Release Runner (agent-runner)

The Skatzi/agent-runner release workflow builds the macOS desktop app (Agent Runner.app) on a Mac, because the app needs cgo and the macOS SDK. That job runs on a dedicated Gitea Actions runner on the Mac mini. This page covers the platform side: what the runner is, what it can reach, its limits, and how to remove it. The full install steps, including the LaunchDaemon plist, are in the agent-runner build and release docs under macOS Gitea Actions runner. That page and this one describe the same instance-wide setup.

Runner name mac-mini-release
Label macos-arm64:host, and no other label
Scope Instance runner, registered under Site Administration → Actions → Runners (owner's decision, 2026-10-05)
macOS account agent-release-build (standard, non-admin)
Service LaunchDaemon com.skatzi.agent-release-build, running as that account
Status Online since 2026-10. It built the desktop app for v0.5.6 and v0.5.7 (Taskbase #341)

Where it fits in a release

Pushing a v* tag runs .gitea/workflows/release.yml:

  1. goreleaser (Linux, ubuntu-latest): builds the six runner binaries and, since agent-runner task #359, cross-builds the Windows desktop app zips. Since agent-runner task #689 it also builds the per-user Windows installers Agent-Runner_windows_<arch>_setup.exe with makensis. It signs checksums.txt, which covers the zips and installers, with minisign and publishes the release right away. Runners can self-update from a tag without waiting for the Mac.
  2. desktop (runs-on: macos-arm64, on this runner): builds and zips the arm64 app and, since agent-runner task #688, the Agent-Runner_darwin_arm64.dmg installer. It uploads Agent-Runner_darwin_arm64.app.zip and the .dmg, adds both SHA-256 sums to checksums.txt and signs it again.

If the Mac is offline or the desktop job fails, the release stays published without the app zip and without the .dmg. In that case the desktop app offers no update for that release, and new macOS machines cannot do a first install from it until the desktop job runs. The release design is recorded in ADR-0006, Self-update, and the installers in the 2026-10-09 amendment under ADR-0006, Desktop app.

The :host label runs jobs directly on the Mac rather than in a container. The Cocoa/cgo build needs this to use the Mac's SDK.

The same runner also takes the macos job of .gitea/workflows/ci.yml (agent-runner task #373). That job builds the app bundle and runs every test on each pull request and each push to main.

Account and access boundary

The runner runs under its own standard macOS account, agent-release-build. It must not be the account that runs the Taskbase agent runner on the same Mac.

  • The account needs the build tools listed in the agent-runner section, including the Homebrew gitea-runner, on its PATH. It also needs outbound HTTPS to Gitea and to Go module sources.
  • It writes only to its own home, the checkout and work directories, and temporary files.
  • It has no access to the agent runner's config, secrets.json, workspaces or service.
  • The runner's .runner registration file is readable only by this account.
  • A person with admin rights installs the LaunchDaemon plist (root:wheel, 0644). The daemon itself runs as the standard account.

Secret exposure

Jobs on this host can read the repository checkout and the release workflow's secrets:

  • GITEA_TOKEN, used to upload the asset and edit the release
  • MINISIGN_SECRET_KEY and MINISIGN_PASSWORD, the release signing key that every runner's self-update trusts

The workflow writes the key to $RUNNER_TEMP with umask 077 and deletes it when the step exits. Even so, any Skatzi/agent-runner job scheduled on this runner can read these secrets while it runs. A leaked signing key requires a key rotation, described in the agent-runner build and release docs under Releases are signed. Runners in the field then need one manual update.

Limitation: labels do not restrict who can use the runner

Two Skatzi/agent-runner workflows request macos-arm64: the release.yml tag workflow and the pull-request CI's macos job. The release job's v* tag trigger and its startsWith(gitea.ref, 'refs/tags/v') guard keep the release secrets out of branch and pull-request builds. The CI job, however, runs the pull request's own code on the Mac. It gets no secrets, but it runs as the same agent-release-build account and shares its home, Go module cache and setup-go toolcache with the release desktop job, so a pull request can affect a later signed release build. Only trusted writers should be able to push branches or open pull requests there.

Gitea labels do not restrict who can use the runner. Because the runner is registered for the whole instance, any repository on gitea.prod.skatzi.com that someone can push a workflow to can request macos-arm64 jobs. Those jobs run directly on the Mac mini as the agent-release-build user, with that account's files and network access.

Within Skatzi/agent-runner, anyone who can edit workflows can also add a job that requests the label and receives the release secrets. Only trusted writers should be able to push tags or change workflows there. Jobs from other repositories do not get Skatzi/agent-runner's secrets, but they can read whatever the agent-release-build account can read on the Mac, including files a release job leaves behind. Keep that account free of anything outside the release build.

Setup

Install and register the runner with the steps in the agent-runner build and release docs under macOS Gitea Actions runner. That section holds the only copy of the commands, the token handling and the LaunchDaemon plist. The platform side of the setup is:

  • A Gitea site administrator creates the instance registration token under Site Administration → Actions → Runners.
  • The runner registers with the name and the single label in the table at the top of this page.
  • A person with admin rights on the Mac installs the LaunchDaemon plist.
  • Afterwards the runner shows as online under Site Administration → Actions → Runners, and a disposable v* test tag, verified against checksums.txt.minisig and then deleted, proves the release path.

Removal

  1. Stop the daemon: sudo launchctl bootout system /Library/LaunchDaemons/com.skatzi.agent-release-build.plist, then delete the plist.
  2. Delete mac-mini-release in Site Administration → Actions → Runners. This step is required: deleting the local files alone leaves the registration listed.
  3. Remove ~/actions-runner, including .runner, from the agent-release-build account. Remove the account if nothing else uses it.

After removal, tags still publish the runner binaries, but releases have no desktop app zip until a Mac runner is registered again.