https://github.com/dipankardas011/automate-gh-custom-runner
https://github.com/dipankardas011/automate-gh-custom-runner
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dipankardas011/automate-gh-custom-runner
- Owner: dipankardas011
- License: apache-2.0
- Created: 2024-06-21T17:00:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-16T05:33:05.000Z (about 1 year ago)
- Last Synced: 2025-02-16T18:25:35.367Z (8 months ago)
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Custom Runner Automation
## Purpose
When you don't have money to burn for achieving the highly scalable github custom runner infra (aka using Kubernetes)
It is also much more sustainable, only send amount of energy and resources as you requireYou can append terraform which (Create and Destroy infra). Thus, achieve true 0 to X nodes and back to 0 nodes. [Refer Implementation in ksctl](https://github.com/ksctl/ksctl/tree/main/test/gh-runner) [Usage](https://github.com/ksctl/ksctl/blob/main/.github/workflows/e2e.yml)
## How it works
You provide it runnernames and it will bootstrap node(s)
It all depends on you if you want to make each runner to exist on different machine its possible
If you want it to make bootstrap multiple runners inside one machine (use when you have huge machine)It creates a user same as runnerName you had given, and it bootstraps to the directory `~/actions-runner`
## Usage methods
### working with the github registration token
```bash
export ORG_REGISTRATION_TOKEN="" # registration token already present
ansible-playbook -i ~/inventory.ini add-runners.yml --tags all,use_reg_token
``````bash
export ORG_REGISTRATION_TOKEN="" # registration token already present
ansible-playbook -i ~/inventory.ini rm-runners.yml --tags all,use_reg_token
```### working with the github pat token to generate the registration token
```bash
export GH_TOKEN="" # to generate the registration token using the GH_PAT api key
ansible-playbook -i ~/inventory.ini add-runners.yml --tags all
``````bash
export GH_TOKEN="" # to generate the registration token using the GH_PAT api key
ansible-playbook -i ~/inventory.ini rm-runners.yml --tags all
```