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

runner configuration without prompt

Solved! Go to Solution.

Hello,

When we configure a runner, he asks for the name of the runner and the workdir forlder.

 

Is it possible to configure a runner automaticly ?

Example : 

./config.sh --url https://github.com/toto/toto --token ALKSADLKASD:LAKSJDLSKAJLKJDSA --name linux --workdir /opt

 

Thanks

2 Replies
Solution
GitHub Partner
Message 2 of 3

Re: runner configuration without prompt

You can try the following command lines, when you install an self-hosted runner, enter the correct values of the parameters into the command lines.

And then just execute the command lines once, It will automatically complete to download package, extract package, and install runner according to the given parameters.

On Windows:

Invoke-WebRequest -Uri https://githubassets.azureedge.net/runners/2.161.0/actions-runner-win-x64-2.161.0.zip -OutFile actions-runner-win-x64-2.161.0.zip; Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$PWD/actions-runner-win-x64-2.161.0.zip", "$PWD"); ./config.cmd --url <repo_url> --token <PAT> --agent <runner_name> --work <work_dir> --runasservice

 

On Linux:

curl -O https://githubassets.azureedge.net/runners/2.161.0/actions-runner-linux-x64-2.161.0.tar.gz; tar xzf ./actions-runner-linux-x64-2.161.0.tar.gz; ./config.sh --url <repo_url> --token <PAT> --agent <runner_name> --work <work_dir> --runasservice

 

On macOS:

curl -O https://githubassets.azureedge.net/runners/2.161.0/actions-runner-osx-x64-2.161.0.tar.gz; tar xzf ./actions-runner-osx-x64-2.161.0.tar.gz; ./config.sh --url <repo_url> --token <PAT> --agent <runner_name> --work <work_dir> --runasservice
Copilot Lvl 2
Message 3 of 3

Re: runner configuration without prompt

Thanks, it's very helpful