This project aims to create a self-hosted runner for GitHub Actions using Windows containers that is compatible with the actions-runner-controller.
I used Azure Kubernetes Service for developing this solution. While I am sure all this can be done with other flavors of Kubernetes, this documentation will be AKS focused.
- A Kubernetes cluster with a Windows node pool using
conatinerd
, AKS and containerd. - A working install of the actions-runner-controller.
- A container repository for Kubernetes to retrieve the image from (GitHub Packages, Azure Container Registry, Docker Hub).
Ensure you have Docker Desktop installed on your Windows machine.
Using the included Dockerfile
, include the RUNNER_VERSION
in the docker build
command.
docker build -t winrunner --build-arg RUNNER_VERSION=<VERSION NUMBER> .
An example RunnerDeployment
using the image, given this is a Windows-based container you may need to add whatever tolerations and or labels you are using to select your Kubernetes Windows node pool:
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: example-org-win-runner
spec:
replicas: 2
template:
spec:
image: ghcr.io/antgrutta/winrunner:latest
dockerdWithinRunnerContainer: true
organization: antgrutta
The file Dockerfile-example
is included in the repository to demonstrate how one might add some common tooling to the container to make it more useful.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request
This project was inspired by the excellent work of others, this list contains links to the original projects/articles used in creating this project.