Skip to content

Quick Start

vzakaznikov edited this page Mar 7, 2024 · 2 revisions

Set environment variables corresponding to your GitHub repository and Hetzner Cloud project.

export GITHUB_TOKEN=ghp_...
export GITHUB_REPOSITORY=testflows/testflows-github-hetzner-runners
export HETZNER_TOKEN=GJzdc...
✋ Note:

By default, the --with-label is set to self-hosted to match only the jobs that contain the self-hosted label. Therefore, your job must have the self-hosted label for the runner to be created.

job-name:
  runs-on: [self-hosted]

Then, start the github-hetzner-runners program:

github-hetzner-runners
07/22/2023 08:20:37 PM   INFO MainThread            main 🍀 Logging in to Hetzner Cloud
07/22/2023 08:20:37 PM   INFO MainThread            main 🍀 Logging in to GitHub
07/22/2023 08:20:37 PM   INFO MainThread            main 🍀 Getting repository testflows/testflows-github-hetzner-runners
07/22/2023 08:20:37 PM   INFO MainThread            main 🍀 Creating scale-up services
07/22/2023 08:20:37 PM   INFO MainThread            main 🍀 Creating scale-down services
07/22/2023 08:20:38 PM   INFO   worker_2   create_server 🍀 Create server
...

Alternatively, you can pass the required options using the command line as follows:

github-hetzner-runners --github-token <GITHUB_TOKEN> --github-repository <GITHUB_REPOSITORY> --hetzner-token <HETZNER_TOKEN>
Clone this wiki locally