I would like to ask, how to configure GitHub workflow self-hosted runner to be able to pickup multiple tasks together. I'm running the GitHub self-hosted runner on Ubuntu 22.04 with docker.
Everything is working great, only still I must wait longer time, because runner is not able to pickup multiple tasks together although in workflow it's so set up. Also in GitHub in workflow screen, in summary section, I see, that some of tasks are able to run parallel, but runner pickup only one at time.
Thanks a lot for an each help :-)
The runner process will only run a single job at a time. But if the host of the runner has enough CPU and IO and RAM to host more than one job at a time, you can always install a extra runner on the same VM in a different folder. There is no limit to the number of runners you can put on a single machine.
The only downside is that each runner will have its own workspace, task cache etc and that in order to bring the host offline, you should turn off all runners on the same host individually.
There are also a few downsides and security issues with such a setup, since one job could influence the outcome of another job. Ideally each runner runs under its own user and won't have access to any folder owned by the other runner. Also be careful with any jobs that install things globally on the server (e.g. npm install -g
or apt-get install
), two jobs trying this at the same time may run into eachothers locks.
Maybe a better way to leverage the full power of the host is to run multiple VMs or Containers.