cft
Become a CreatorSign inGet Started

Github Action Windows Runners on Docker Container

Github Action Windows Runners on Docker Container


user

Khalid Bin Sattar

12 days ago | 1 min read
Follow

You need to install the following in your local machine:

During or after installation of Docker, switch to Windows Container, rather than Linux containers, as we need to use the Windows Servercore image. Now, clone this repo https://github.com/khalidbinsattar/docker-github-self-hosted-runner on your local machine. Next, go to https://github.com/settings/tokens and create a Personal Access Token with repo scope.





Once you have the token, you can run the runner-setup PowerShell script to create the environment file for the container that has the repo url where the Actions with self-hosted runner will run, and the personal access token required to connect to the GitHub API.



PS C:\github\docker-github-self-hosted-runner> .\runner-setup.ps1 -repo “khalidbinsattar/docker-github-self-hosted-runner” -githubPersonalAccessToken “<TOKEN>”

Now run docker-compose up –build and you should see the container being built and started with the GitHub Runner.



You should now be able to see the runner on the repo that you setup the env file for.







Upvote


user
Created by

Khalid Bin Sattar

Follow

people
Post

Upvote

Downvote

Comment

Bookmark

Share


Related Articles