Documentation about how to set up self-hosted runners
First of all thank you for developing such a useful action.
It works flawlessly for github runners but I am having trouble for a non ephemeral self-hosted runner.
By reading some issues, I came to understand that self-hosted runners need some manual configuration, like setting up the known hosts file and such.
While I could figure it out on my own with some effort, it would be much appreciated if the README file explained the steps needed to set up self-hosted runners.
Seconded, also experiencing issues with non-ephemeral self-hosted runners. @LastStarDust what manual configuration did you need to perform if you're able to share?
I had to reset the SSH and git configuration of the self-hosted runner and then I had to manually copy the private SSH keys with appropriate names. Moreover I had to modify the following snippet with the correct user name of the runner.
RUN sed 's|/home/runner|/root|g' -i.bak /root/.ssh/config
@LastStarDust Do you have an example of what you needed to do? As I have come across the same issue
My memory is hazy but here is what I remember:
In the self-hosted runner (assuming github as user name):
-
rm /home/github/.ssh/* -
vi /home/github/.ssh/authorized_keys - Add your key and save
-
ssh-keyscan github.com >> ~/.ssh/known_hosts
If you use docker inside the runner, you might need to add the following command to the Dockerfile:
RUN sed "s|/home/github|/home/${USERNAME}|g" -i.bak .ssh/config
where USERNAME is the name of the user inside the docker image. But the paths might be different depending on how you setup the image environment.
Friendly reminder
I am giving up on this for lack of interest (both on my side and maintainers' side).