-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update - readme docs, license, cicd workflow steps (#4)
* update - readme docs and license * update - readme docs and license * update - readme docs and license * update - readme docs and license * update - readme docs and license
- Loading branch information
Showing
6 changed files
with
98 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Chad Crouch | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,64 @@ | ||
# gha-runner | ||
# GitHub Actions Runner Docker | ||
|
||
This guide provides detailed instructions for setting up a self-hosted GitHub Actions Runner using Docker. You can choose to run the container with `docker run` or `docker-compose`. | ||
|
||
## Prerequisites | ||
|
||
Before starting, ensure you have the following: | ||
|
||
1. **Docker Installed** | ||
Ensure Docker is installed and running on your system. You can follow the [official installation guide](https://docs.docker.com/get-docker/) for help. | ||
|
||
2. **Docker Compose (Optional)** | ||
If using `docker-compose`, ensure it is installed. You can find installation instructions in the [official Docker Compose guide](https://docs.docker.com/compose/install/). | ||
|
||
3. **GitHub Runner Token** | ||
- Go to your GitHub repository or organization. | ||
- Navigate to **Settings > Actions > Runners**. | ||
- Click **Add Runner** and copy the registration token provided. | ||
|
||
## Steps to Set Up the GitHub Actions Runner With Docker | ||
|
||
You can set up the runner using either `docker run` or `docker-compose`. Choose the method that suits your setup. | ||
|
||
1. **Docker Run** | ||
```bash | ||
docker run -d \ | ||
-e GITHUB_URL=https://github.com/<your-org-or-repo> \ | ||
-e RUNNER_TOKEN=<your-runner-token> \ | ||
--name <container-name> \ | ||
chaddyc/gha-runner:latest | ||
``` | ||
|
||
2. **Docker Compose** | ||
```yaml | ||
services: | ||
github-runner: | ||
image: chaddyc/gha-runner:latest | ||
container_name: <container-name> | ||
environment: | ||
- GITHUB_URL=https://github.com/<your-org-or-repo> | ||
- RUNNER_TOKEN=<your-runner-token> | ||
restart: unless-stopped | ||
``` | ||
3. **Docker Compose - Multi Containers** | ||
```yaml | ||
services: | ||
github-runner: | ||
image: chaddyc/gha-runner:latest | ||
#container_name: <container-name> | ||
#don't use container name when deploying multi replica containers of your gha-runner | ||
deploy: | ||
mode: replicated | ||
replicas: 2 | ||
environment: | ||
- GITHUB_URL=https://github.com/<your-org-or-repo> | ||
- RUNNER_TOKEN=<your-runner-token> | ||
restart: unless-stopped | ||
|
||
## License | ||
|
||
[MIT](LICENSE) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters