Skip to content

kaxem/github-actions-runner-image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

How it works?

There are two main files:

  • Dockerfile, to build an ubuntu runner
  • start.sh, to config image and run Github's script

Dockerfile

This image downloads github's official runner tar file from github, also installs Docker-in-docker(we need to install docker daemon to run docker build step in github workflow) and then runs start.sh

start.sh

this script first gets repository's url and token provided at repo/setting/actions/runners/linux as variables then run the ./run.sh there's also a function for every time image stopped or removed automatically delete the runner.

How to make a runner instance?

first install docker on vm sudo apt update && apt install docker
copy this two files and just change runner's name in start.sh
build image withdocker build -t <image_name:tag> .
then run image with docker run -e GH_REPOSITORY="github repository url" -e GH_TOKEN="token for runner" -d <image_name:tag>

About

Run self-hosted runners within 2 minutes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 75.5%
  • Shell 24.5%