Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

is there a way to cause a self-hosted runner to disconnect after completing a single job?

In Jenkins I would do this by running the agent with -noReconnect and disconnect the runner from the server immediately after a workflow completion. Is there an equivalent method with Github actions?

1 Reply
Highlighted
GitHub Partner
Message 2 of 2

Re: is there a way to cause a self-hosted runner to disconnect after completing a single job?

Sorry to tell you that there is no equivalent method like -noReconnect in Jenkins. 

According to the official document, you need to disconnect runner manually. Disconnect self-hosted runner automatically after completing a job is not possible.  

stop self-hosted runner.png

If your self-hosted runner is on your local machine you could shot down the machine. Or you could stop the run application . If your runner is running as service, you could stop the service. If you run it by executing run.sh/run.cmd, you could close the terminal or CMD window to let the runner application stop.