This creates a Github Runner that runs on your local machine using Docker.
UPDATE: Turns out this isn't possible because Github Actions disallows it. There's hopes that it'll be fixed soon. Until then, this solution frustratingly doesn't work. One of the more popular repos also has this problem:
docker run -it --name my-runner \
-e RUNNER_NAME=my-runner \
-e GITHUB_ACCESS_TOKEN=<github-personal-access-token> \
-e RUNNER_REPOSITORY_URL=<github-repo-url> \
-v /var/run/docker.sock:/var/run/docker.sock \
tcardonne/github-runner
- Create a Github Personal Access Token with the Repo Scope. This will be used to generate a token to register a GithubRunner.
- If your Github Runner will talk to AWS, set up your AWS CLI and authenticate to your AWS account and store those credentials in the
default
profile. - Start the runner
You will be prompted for your
./go run <github-repo-url> <github username>
'host'
password. This is the Github Personal Access Token that you created in (1). - Trigger a pipeline in the
<github-repo-url>
and see it connect.
Build the container locally: ./go build