# get the runner image
podman pull code.forgejo.org/forgejo/runner:12

# enable rootless podman socket, if not already done
systemctl --user enable --now podman.socket

# generate initial config file
podman run --rm code.forgejo.org/forgejo/runner:12 \
  forgejo-runner generate-config > config.yml
# edit baseline config, and stow it somewhere

# shell in to temp container, with socket given as bind mount, and
# register with forgejo instance, remembering that it needs to be
# on the forgejo network
podman run --rm -it --entrypoint /bin/bash \
  -v "${XDG_RUNTIME_DIR}/podman/podman.sock:/var/run/docker.sock" \
  --network forgejo code.forgejo.org/forgejo/runner:12
$ forgejo-runner register
$ cat .runner
$ exit
# edit contents of .runner into a file on the host; in the same place
# as the config file would be a good idea

# start container with socket (w/usermapping), config file, and runner
podman run -d \
  --entrypoint '["/bin/forgejo-runner", "--config", "/data/config.yml", "daemon"]' \
  -v /PATH/TO/RUNNERFILE:/data/.runner -v /PATH/TO/CONFIG:/data/config.yml \
  -v "${XDG_RUNTIME_DIR}/podman/podman.sock:/var/run/docker.sock:U" \
  --name fjrunner --network forgejo code.forgejo.org/forgejo/runner:12

This got me to a state with a working runner, which tried to execute a work flow, but it failed to checkout the code. The failure definitely has something to do with the fact that both my Forgejo instance and my runner are containers. They share a network in podman, and they can communicate with each other (else runner registration wouldn’t have worked), but then the image on the runner fails to be able to resolve the Forgejo container.

This feels like a problem that can be solved, but I’m not sure that it’s worth the effort right now. Getting a runner mostly-working was an all-night exercise which kept me from doing actual coding that I had initially set out to do, and more importantly I can also take care of code quality assurances with pre-commit hooks.