25 lines
1.3 KiB
Markdown

# Runner
This subfolder of the project adds a github action runner when started with a docker compose.
Github Actions is the build in CI/CD functionality of github. Runners are the instances that execute the actions required by the CI/CD.
Github allows runners as a service or selfhosted. Since we will not get accees to the FH-SWF cloud resource we will use the selfhosted version of the runner.
## Configure & Startup
To start a github runner please add a `.env` config file with key value pairs for the following variables.
```
ORGANIZATION=fhswf/aki_prj23_transparenzregister
ACCESS_TOKEN= #
ARCHITECTURE=arm # Value such as x64,arm64,arm
HOSTNAME=some-runner-name # A name to give to the docker image. Will also be used as a runner name.
DGID= # Group id of the docker group
```
An access token can be optained in the Actions ection of the repository or [here](https://github.com/fhswf/aki_prj23_transparenzregister/settings/actions/runners/new).
To startup the runner execute `docker compose up -d --build`.
Docker needs to be installed. Additionally you may need to execute the docker comands as root.
## Sources
This runner configuration is based on [this article](https://testdriven.io/blog/github-actions-docker/).