Categorygithub.com/tkmsaaaam/local-runner-controller
repositorypackage
0.0.0-20250214210013-fb1fa89e4e88
Repository: https://github.com/tkmsaaaam/local-runner-controller.git
Documentation: pkg.go.dev

# README

local-runner-controller

Local Runner Controller is an application that builds images, executes containers, and registers runners to GitHub in order to run GitHub Actions runners on local machines. CI/CD can be executed on a local machine without consuming cloud computing resources (e.g. AWS). A GitHub Actions job is executed as a single container, and when the job finishes, the container is deleted and a new container is launched. CI/CD execution based on user actions such as push and pull_request_target can be executed using local machine resources. On the other hand, it is not recommended to use it for jobs that are not based on user operations (more precisely, the user's PC or laptop may be shut down when cron is started), such as cron executions. like: ARC

Prerecuirements

Setup

  1. Determine to use GitHub Apps or GitHub personal access tokens

  2. Make config.json

{
  "github": {
    "repository": {
      "owner": "OWNER_NAME",
      "name": "REPO_NAME"
    },
    "auth": {
      "is_app": true,
      "access_token": "github_pat_xxxx",
      "app": {
        "id": 0,
        "installation_id": 0,
        "key_path": "/path/to/file_name.private-key.pem"
      }
    }
  },
  "runner_limit": 1
}

Configuration's meanings

namemeaningsrequiredrequired conditiondefault
github.repository.ownerName of the owner of the repository where the runner is registeredtruealways-
github.repository.nameName of the repository where the runner is registeredtruealways-
github.auth.is_appWhether authentication is done by app or notfalse-false
github.auth.access_tokenGitHub personal access tokenstruegithub.auth.is_app is false""(empty)
github.auth.app.idGitHub Apps IDtruegithub.auth.is_app is true0
github.auth.app.installation_idInstallation ID of GitHub Appstruegithub.auth.is_app is true0
github.auth.app.key_pathGitHub Apps private key pathtruegithub.auth.is_app is true""(empty)

How to start

go run main.go

Author

tkmsaaaam