Skip to content

Specifying The Custom Runner Server Startup Script

vzakaznikov edited this page Feb 28, 2024 · 3 revisions

You can specify a custom runner server startup script using the --scripts option which can be used to specify a path to the folder that contains all your custom runner server scripts.

For example, you can create a local folder called scripts and add your custom startup-x64.sh and startup-arm64.sh that will overwrite the default startup-x64.sh and startup-arm64.sh scripts that are defined in testflows/github/hetzner/runners/scripts/startup-x64.sh and testflows/github/hetzner/runners/scripts/startup-x64.sh.

mkdir scripts

Then, inside the scripts folder you can place your custom setup-x64.sh and setup-arm64.sh scripts.

You can apply your custom scripts using the --scripts option as follows:

github-hetzner-runners --scripts ./scripts

Job Specific Custom Startup Script

The default server startup script is startup-x64.sh for the x64 architecture and startup-arm64.sh for the ARM64 architecture. However, you can use the startup-{name} label to select any custom script inside the scripts directory that you can specify using the --scripts option. Where the {name} shall match the {name}.sh file inside the scripts folder.

✋ Note: Note the .sh extension is assumed for the script {name}.

For example,

scripts/
scripts/custom.sh
job-name:
   runs-on: [self-hosted, startup-custom]
Clone this wiki locally