GitHub Webhook

This entry is part 10 of 12 in the series Scalable Self-Hosted GitHub Runners on AWS Cloud

Scalable Self-Hosted GitHub Runners on AWS Cloud

Architecture Overview and Infrastructure Components

ECR Runner Image Repository

Self-hosted GitHub Runner(s) Registration Token

Hosting the Runner Docker Artifacts on CodeCommit

Build/Push Runner Image using CodeBuild

Scalable ECS Cluster

EventBus and Schema Discover for Webhook Events

ECS Runner Task Definition

Lambda Function URL

GitHub Webhook

EventBridge Rule

Testing the Final Infrastructure

The Lambda Function URL and secret noted during the CloudFormation stack deployment will be required to complete the configuration of the Github Organization webhook.

Login to GitHub using an account with administrator access for the target organization and

For example, to generate a token for an organization named foo-organisation (https://github.com/foo-organisation)

  • Navigate to “Your Organizations
organization webhook
  • choose Settings > Webhooks -> “Add Webhook” for the target organization in list
  • Payload URL: Enter the Lambda Function URL
  • Content typeapplication/json
  • Secret: Enter the secret used during the creation of the Lambda Function URL
  • Which events would you like to trigger this webhook?
    • Let me select individual events
      • Workflow job
        • set to active
  • Add Webhook
add github webhoo

Scalable Self-Hosted GitHub Runners on AWS Cloud

Lambda Function URL EventBridge Rule