https://github.com/garysassano/cdk-aws-codebuild-github-runners
CDK app that, given an existing GitHub repository, attaches a repository webhook that triggers self-hosted runners in AWS CodeBuild when workflow jobs are queued
https://github.com/garysassano/cdk-aws-codebuild-github-runners
aws aws-cdk aws-codebuild codebuild github-actions github-runners github-webhooks self-hosted-runners webhooks
Last synced: 3 months ago
JSON representation
CDK app that, given an existing GitHub repository, attaches a repository webhook that triggers self-hosted runners in AWS CodeBuild when workflow jobs are queued
- Host: GitHub
- URL: https://github.com/garysassano/cdk-aws-codebuild-github-runners
- Owner: garysassano
- License: apache-2.0
- Created: 2024-05-23T11:31:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-01T04:16:39.000Z (4 months ago)
- Last Synced: 2025-03-01T05:19:55.886Z (4 months ago)
- Topics: aws, aws-cdk, aws-codebuild, codebuild, github-actions, github-runners, github-webhooks, self-hosted-runners, webhooks
- Language: TypeScript
- Homepage:
- Size: 115 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cdk-aws-codebuild-github-runners
CDK app that, given an existing GitHub repository, attaches a repository webhook that triggers [self-hosted runners in AWS CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/action-runner.html) when workflow jobs are queued.
### Related Apps
- [cdktf-aws-codebuild-github-runners](https://github.com/garysassano/cdktf-aws-codebuild-github-runners) - Built with CDKTF instead of AWS CDK.
- [cdktf-aws-codebuild-github-runners-organization](https://github.com/garysassano/cdktf-aws-codebuild-github-runners-organization) - Built with CDKTF instead of AWS CDK; uses a GitHub organization webhook instead of repository webhook.## Prerequisites
- **_AWS:_**
- Must have authenticated with [Default Credentials](https://docs.aws.amazon.com/cdk/v2/guide/cli.html#cli_auth) in your local environment.
- Must have completed the [CDK bootstrapping](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html) for the target AWS environment.
- **_GitHub:_**
- Must have created a GitHub repository in your personal account.
- Must have set the `GITHUB_TOKEN`, `GITHUB_OWNER` and `GITHUB_REPO` variables in your local environment.
- **_Node.js + npm:_**
- Must be [installed](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) in your system.## Installation
```sh
npx projen install
```## Deployment
```sh
npx projen deploy
```## Usage
1. Navigate to `https://github.com///actions/workflows/hello-world.yml`.
2. Click `Run workflow` ➜ `Run workflow`.
3. Your workflow will be enqueued and run on an ephemeral EC2 instance managed by AWS CodeBuild.
## Cleanup
```sh
npx projen destroy
```## Architecture Diagram
