Skip to content

antgrutta/windows-runner-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Self-Hosted Runner Windows Container

This project aims to create a self-hosted runner for GitHub Actions using Windows containers that is compatible with the actions-runner-controller.

Getting Started

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.

Prerequisites

Building Locally

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> .

Using the Image with the Runner Controller

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

Adding to the container

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.

Contributing

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

Acknowledgements

This project was inspired by the excellent work of others, this list contains links to the original projects/articles used in creating this project.