cyclenerd/Self-Hosted GitHub Actions Runner on Hetzner Cloud

A GitHub Action to automatically create Hetzner Cloud servers and register them as self-hosted GitHub Actions runners.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
create_waitWait up to 'create_wait' retries (10 sec each) to create the Server resource via the Hetzner Cloud API (default: 360 = 1 hour).no360
delete_waitWait up to 'delete_wait' retries (10 sec each) to delete the Server resource via the Hetzner Cloud API (default: 360 = 1 hour).no360
enable_ipv4Attach an IPv4 on the public NIC (true/false) . If false, no IPv4 address will be attached. Warning: The GitHub API requires IPv4. Disabling it will result in connection failures.notrue
enable_ipv6Attach an IPv6 on the public NIC (true/false). If false, no IPv6 address will be attached.notrue
github_tokenFine-grained GitHub Personal Access Token (PAT) with 'Read and write' access to 'Administration' assigned.yes
hcloud_tokenHetzner Cloud API token with 'Read & Write' permissions assigned.yes
imageName or ID (integer) of the Image the Server is created from.noubuntu-24.04
locationName of Location to create Server in.nonbg1
modeChoose either 'create' to create a new GitHub Actions Runner or 'delete' to delete a previously created one.yes
nameThe name for the server and label for the GitHub Actions Runner (must be unique within the project and conform to hostname rules: '[a-zA-Z0-9_-]').no
networkComma separated Network IDs (integer) which should be attached to the Server private network interface at the creation time.nonull
pre_runner_scriptSpecifies bash commands to run before the GitHub Actions Runner starts. It's useful for installing dependencies with apt-get, dnf, zypper etc.no
primary_ipv4ID (integer) of the IPv4 Primary IP to use. If omitted and 'enable_ipv4' is true, a new IPv4 Primary IP will automatically be created.nonull
primary_ipv6ID (integer) of the IPv6 Primary IP to use. If omitted and 'enable_ipv6' is true, a new IPv6 Primary IP will automatically be created.nonull
runner_dirGitHub Actions Runner installation directory (created automatically; no trailing slash).no/actions-runner
runner_waitWait up to 'runner_wait' retries (10 sec each) for runner registration (default: 10 minutes).no60
runner_versionGitHub Actions Runner version (omit 'v'; e.g., '2.321.0'). 'latest' will install the latest version. 'skip' will skip the installation. A working installation is expected in the 'runner_dir'.nolatest
server_idID (integer) of Hetzner Cloud Server to delete.no
server_typeName of the Server type this Server should be created with.nocx23
server_waitWait up to 'server_wait' retries (10 sec each) for the Hetzner Cloud Server to start (default: 30 = 5 min).no30
ssh_keyComma separated SSH key IDs (integer) which should be injected into the Server at creation time.nonull
volumeComma separated Volume IDs (integer) which should be attached to the Server at the creation time.nonull
namedescription
labelThis label uniquely identifies a GitHub Actions runner, used both to specify which runner a job should execute on via the `runs-on` property and to delete the runner when it's no longer needed.
server_idThis is the Hetzner Cloud server ID of the runner, used to delete the server when the runner is no longer required.