github-runner-autoscaler

command module
v0.0.0-...-c9db554 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2025 License: MIT Imports: 21 Imported by: 0

README

GitHub Runner Autoscaler

This project provides a Lambda function that launches ephemeral GitHub self-hosted runners on EC2 in response to GitHub workflow job events. The function is deployed using AWS SAM.

Secret configuration

The function expects a GitHub personal access token (PAT) to be stored in AWS Secrets Manager. Create the secret before deploying:

aws secretsmanager create-secret --name my-github-pat --secret-string <PAT>

Deployment

Deploy the stack with SAM and provide the secret name, AMI, subnet, security groups and EC2 key pair used for the runner. You may also specify additional runner labels:

sam deploy \
  --parameter-overrides GitHubPATSecretName=my-github-pat \
  ExtraRunnerLabels="gpu" \
  ImageId=ami-0123456789abcdef0 \
  SubnetId=subnet-12345678 \
  SecurityGroupIds=sg-12345678 \
  KeyName=my-key

The ExtraRunnerLabels parameter is optional. When supplied, the labels are added to the default runner labels. All other parameters are required and must be specified for your environment.

Local samconfig.toml

This repository ignores samconfig.toml and samconfig.yaml so you can maintain environment-specific settings locally. Copy samconfig.example.yaml to samconfig.yaml and adjust the values for your AWS account. Then run SAM commands with the desired configuration environment, for example:

sam build --config-env dev
sam deploy --config-env dev

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL