How to ensure a clean instance with every job execution on a self-hosted runner?

Our self-hosted runner is set up on Kubernetes and uses this image. We’ve noticed that running multiple execution breaks because the runner doesn’t seem to do a full cleanup in between jobs. The docs specify that github hosted runners “provide a  clean instance  for every job execution” but how would we go about that for self-hosted runners? Is there an automated way to do this or would we have to manually clean things up before each run?

6 Likes

For self-hosted runner, currently have to do the cleanup manually for each run, thanks.

1 Like

The selfhosted runners are really **bleep**ty tbh. Why didn’t you just copy what gitlab has? A docker image that is equivalent to the hosted runners but costs you less money, I bet this is what most people need.

1 Like