Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 2.99 KB

File metadata and controls

73 lines (53 loc) · 2.99 KB

Action runners deployment ephemeral example

This example is based on the default setup, but shows how runners can be used with the ephemeral flag enabled. Once enabled, ephemeral runners will be used for one job only. Each job requires a fresh instance. This feature should be used in combination with the workflow_job event. See GitHub webhook endpoint configuration(link needed here). It is also suggested to use a pre-build AMI to minimize runner launch times.

Usages

Steps for the full setup, such as creating a GitHub app can be found in the root module's README. First download the Lambda releases from GitHub. Alternatively you can build the lambdas locally with Node or Docker, there is a simple build script in <root>/.ci/build.sh. In the main.tf you can simply remove the location of the lambda zip files, the default location will work in this case.

Ensure you have set the version in lambdas-download/main.tf for running the example. The version needs to be set to a GitHub release version, see https://github.com/philips-labs/terraform-aws-github-runner/releases

cd lambdas-download
terraform init
terraform apply
cd ..

Before running Terraform, ensure the GitHub app is configured. See the configuration details for more details.

terraform init
terraform apply

You can receive the webhook details by running:

terraform output -raw webhook_secret

Be aware some shells will print some end of line character %.

Requirements

Name Version
terraform >= 1.3.0
aws ~> 5.2
local ~> 2.0
random ~> 3.0

Providers

Name Version
random 3.5.1

Modules

Name Source Version
base ../base n/a
runners ../../ n/a

Resources

Name Type
random_id.random resource

Inputs

Name Description Type Default Required
github_app GitHub for API usages.
object({
id = string
key_base64 = string
})
n/a yes

Outputs

Name Description
runners n/a
webhook_endpoint n/a
webhook_secret n/a