Skip to content

Deploy Github Self-Hosted Runner on Azure Container Apps with Terraform

Notifications You must be signed in to change notification settings

arnaud-tincelin/github-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Self-Hosted Runner ❤️ Azure Container Apps

Demonstrates how to deploy a Self-Hosted Runner on Azure Container Apps with Terraform

Prerequisites

Tooling

  • terraform
  • az cli
  • docker

Github & Azure

  • a github repository
  • a subscription with permissions to create Resources & Assign RBAC roles

Usage

  1. From your GitHub settings, create a fine-grained PAT with Administration repository permissions (write) (see create a registration token for a repository)

  2. Create the ./terraform/terraform.auto.tfvars file from the following template (see variables.tf for additional information)

    github_pat           = "" # from the previous step
    unique_suffix        = ""
    github_owner         = ""
    github_scope         = ""
    github_repository    = ""
    github_runner_labels = "self-hosted"
  3. Deploy the infrastructure + build & push docker image in one command:

    az login
    terraform -chdir=terraform init -upgrade
    ARM_SUBSCRIPTION_ID=XXXXXXXX-XXXX-XXXXXXXXX-XXXXXXXXXXXX terraform -chdir=terraform apply -auto-approve
  4. Run the Test Private Runner workflow from GitHub

  5. Once you are done testing, clean-up:

    ARM_SUBSCRIPTION_ID=XXXXXXXX-XXXX-XXXXXXXXX-XXXXXXXXXXXX terraform -chdir=terraform destroy -auto-approve

About

Deploy Github Self-Hosted Runner on Azure Container Apps with Terraform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published