• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Github self-hosted runner Dockerfile and Kubernetes configuration

awesome-runners

This repository contains a Dockerfile that builds a Docker image suitable for running a self-hosted GitHub runner. A Kubernetes Deployment file is also included that you can use as an example on how to deploy this container to a Kubernetes cluster.

You can build this image yourself, or use the Docker image from the Docker Hub.

Building the container

docker build -t github-runner .

Features

  • Repository runners
  • Organizational runners
  • Labels
  • Graceful shutdown
  • Support for installing additional debian packages
  • Auto-update after the release of a new version

Examples

Register a runner to a repository.

docker run --name github-runner \
     -e GITHUB_OWNER=username-or-organization \
     -e GITHUB_REPOSITORY=my-repository \
     -e GITHUB_PAT=[PAT] \
     sanderknape/github-runner

Register a runner with github token.

docker run --name github-runner \
     -e GITHUB_OWNER=username-or-organization \
     -e GITHUB_REPOSITORY=my-repository \
     -e GITHUB_TOKEN=[github.token] \
     sanderknape/github-runner

Create an organization-wide runner.

docker run --name github-runner \
    -e GITHUB_OWNER=username-or-organization \
    -e GITHUB_PAT=[PAT] \
    sanderknape/github-runner

Set labels on the runner.

docker run --name github-runner \
    -e GITHUB_OWNER=username-or-organization \
    -e GITHUB_REPOSITORY=my-repository \
    -e GITHUB_PAT=[PAT] \
    -e RUNNER_LABELS=comma,separated,labels \
    sanderknape/github-runner

Install additional tools on the runner.

docker run --name github-runner \
    -e GITHUB_OWNER=username-or-organization \
    -e GITHUB_REPOSITORY=my-repository \
    -e GITHUB_PAT=[PAT] \
    -e ADDITIONAL_PACKAGES=firefox-esr,chromium \
    sanderknape/github-runner

More Repositories

1

aws-cognito-app

A sample application that uses the AWS PHP SDK to implement AWS Cognito functionality
PHP
93
star
2

comparing-serverless-and-sam

Repository with a serverless application deployed through both the Serverless framework and AWS SAM
JavaScript
64
star
3

pr-deployments

37
star
4

assume

A simple CLI utility that makes it easier to switch between different AWS roles
Python
35
star
5

aws-upload-to-s3

Example application for uploading files to S3 using pre-signed URLs
JavaScript
33
star
6

cloudfront-s3-origin-website-redirects

CloudFront website redirects for an S3 origin. Available through the Serverless Application Repository
JavaScript
21
star
7

serverless-website

JavaScript
18
star
8

cognito-apigateway-jwt

Shell
15
star
9

aws-secrets-manager-custom-secret

A custom secret example for AWS Secrets Manager
JavaScript
12
star
10

serverless-payment-workflow

TypeScript
7
star
11

reactjs-google-maps

An example ReactJS application using a Google Maps widget
JavaScript
6
star
12

codedeploy-parameter-store-utility

A utility function that fetches secrets from AWS Parameter Store during an CodeDeploy deployment
Python
5
star
13

block-s3-buckets-cloudformation-custom-resource

A CloudFormation custom resource for blocking the creation of public S3 buckets
Python
3
star
14

tfsec-enforce-tagging

A sample repository that showcases how to combine Terraform with tfsec to enforce tagging on all AWS resources
HCL
3
star
15

cloudformation-custom-resource-example

A CloudFormation custom resource example for CodeDeploy
1
star
16

nginx

Nginx configuration files as discussed in my blog posts: https://sanderknape.com
1
star
17

cloudformation-security-scan

An example Python script to run a CloudFormation security scan using CloudSploit
Python
1
star