### Launch github-hetzner-runners with CLI arguments Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Example of launching the github-hetzner-runners program via the command line, specifying necessary tokens and repository details. ```bash github-hetzner-runners --github-token --github-repository --hetzner-token ``` -------------------------------- ### Install GitHub Hetzner Runners from Sources Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Installs the utility directly from its source code repository. This method is useful for development or when needing the latest unreleased changes. It involves cloning the repository and running installation scripts. ```bash git clone https://github.com/testflows/testflows-github-hetzner-runners.git ./package && ./install ``` -------------------------------- ### Install testflows.github.hetzner.runners Python package Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Command to install the required Python package for managing GitHub Actions runners on Hetzner Cloud. Ensure the installation directory is in your PATH. ```bash pip3 install testflows.github.hetzner.runners ``` -------------------------------- ### Verify GitHub Hetzner Runners Installation Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Checks if the github-hetzner-runners utility has been installed correctly by displaying its version number. This is a crucial step after installation to confirm success. ```bash github-hetzner-runners -v ``` -------------------------------- ### Verify github-hetzner-runners installation Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Command to check if the github-hetzner-runners utility was installed correctly and display its version. ```bash github-hetzner-runners -v ``` -------------------------------- ### Start GitHub Hetzner Runners Program Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Launches the github-hetzner-runners program after setting the necessary environment variables. The program will then connect to Hetzner Cloud and GitHub to manage runners. ```bash github-hetzner-runners ``` -------------------------------- ### Install GitHub Hetzner Runners via Pip Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Installs the testflows-github-hetzner-runners package using pip. This command requires Python 3.7 or later and ensures the utility is available in your environment. ```bash pip3 install testflows.github.hetzner.runners ``` -------------------------------- ### Set Environment Variables for Quick Start Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Configures essential environment variables required for the github-hetzner-runners to connect to GitHub and Hetzner Cloud. This includes GitHub API token, repository, and Hetzner Cloud token. ```bash export GITHUB_TOKEN=ghp_... export GITHUB_REPOSITORY=testflows/testflows-github-hetzner-runners export HETZNER_TOKEN=GJzdc... ``` -------------------------------- ### Check github-hetzner-runners executable path Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Command to locate the installed github-hetzner-runners executable, typically in ~/.local/bin. Ensure this directory is in your system's PATH. ```bash which github-hetzner-runners ``` -------------------------------- ### Check Runner Executable Path Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Verifies the installation path of the github-hetzner-runners executable. It typically resides in the ~/.local/bin directory, which should be included in your system's PATH. ```bash which github-hetzner-runners ``` -------------------------------- ### Add ~/.local/bin to PATH on Ubuntu Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Configures the system's PATH environment variable to include the ~/.local/bin directory, ensuring that executables installed by pip are accessible. This is done by modifying the ~/.profile file. ```bash # set PATH so it includes the user's private bin if it exists if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi ``` -------------------------------- ### GitHub Actions workflow for self-hosted runners Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Example YAML configuration for a GitHub Actions workflow that specifies it should run on self-hosted runners with specific labels, such as 'self-hosted' and 'type-cpx21'. ```yaml name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [push] jobs: Explore-GitHub-Actions: runs-on: [self-hosted, type-cpx21] steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v3 - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - run: echo "🖥️ The workflow is now ready to test your code on the runner." - name: List files in the repository run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." ``` -------------------------------- ### Deploy github-hetzner-runners Service Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Deploys the github-hetzner-runners service to your Hetzner Cloud project. It requires setting environment variables for your GitHub repository and authentication tokens before executing the deploy command. ```bash export GITHUB_REPOSITORY= export HETZNER_TOKEN= export GITHUB_TOKEN= github-hetzner-runners cloud deploy ``` -------------------------------- ### Add ~/.local/bin to PATH on Ubuntu Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Configuration snippet for the ~/.profile file on Ubuntu to add the user's private bin directory to the system's PATH. ```bash # set PATH so it includes the user's private bin if it exists if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi ``` -------------------------------- ### View github-hetzner-runners Service Logs Source: https://github.com/testflows/testflows-github-hetzner-runners/blob/main/README.rst Allows users to view the logs of the running github-hetzner-runners cloud service. The '-f' flag enables following the log output in real-time, which is useful for debugging. ```bash github-hetzner-runners cloud log -f ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.