Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit e16368c

Browse files
marcofranssennpalm
authored andcommitted
docs: Add documentation on manually starting the first runner
1 parent 01f856e commit e16368c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Diff for: README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,20 @@ Examples are provided in [the example directory](examples/). Please ensure you h
7777

7878
The module supports two main scenarios for creating runners. On repository level a runner will be dedicated to only one repository, no other repository can use the runner. On organization level you can use the runner(s) for all the repositories within the organization. See https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners for more information. Before starting the deployment you have to choose one option.
7979

80-
GitHub workflows fail immediately if there is no action runner available for your builds. Since this module supports scaling down to zero, builds will fail in case there is no active runner available. We recommend to create an offline runner with matching labels to the configuration. Create this runner manually by following the GitHub instructions for adding a new runner on your local machine. If you stop the process after the step of running the `config.sh` script the runner will remain offline. This offline runner ensures that builds will not fail immediately and stay queued until there is an EC2 runner to pick it up.
80+
GitHub workflows fail immediately if there is no action runner available for your builds. Since this module supports scaling down to zero, builds will fail in case there is no active runner available. We recommend to create an offline runner with matching labels to the configuration. Create this runner manually by following the [GitHub instructions](https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners) for adding a new runner on your local machine. If you stop the process after the step of running the `config.sh` script the runner will remain offline. This offline runner ensures that builds will not fail immediately and stay queued until there is an EC2 runner to pick it up.
81+
82+
Another convenient way of deploying this temporary required runner is using following approach. This automates all the manual labor.
83+
84+
```bash
85+
docker run -it --name my-runner \
86+
-e RUNNER_LABELS=selfhosted,Linux,Ubuntu -e RUNNER_NAME=my-repo-docker-runner \
87+
-e GITHUB_ACCESS_TOKEN=$GH_PERSONAL_ACCESS_TOKEN \
88+
-e RUNNER_REPOSITORY_URL=https://github.com/my-org/my-repo \
89+
-v /var/run/docker.sock:/var/run/docker.sock \
90+
tcardonne/github-runner:ubuntu-20.04
91+
```
92+
93+
You should stop and remove the container once the runner is registered as the builds would otherwise go to your local Docker container.
8194

8295
The setup consists of running Terraform to create all AWS resources and manually configuring the GitHub App. The Terraform module requires configuration from the GitHub App and the GitHub app requires output from Terraform. Therefore you first create the GitHub App and configure the basics, then run Terraform, and afterwards finalize the configuration of the GitHub App.
8396

0 commit comments

Comments
 (0)