An open API service indexing awesome lists of open source software.

https://github.com/garysassano/cdktf-aws-codebuild-github-runners

CDKTF app that deploys a GitHub repository in a personal account, along with a repository webhook that triggers self-hosted runners in AWS CodeBuild when workflow jobs are queued
https://github.com/garysassano/cdktf-aws-codebuild-github-runners

aws aws-codebuild cdk-for-terraform cdktf codebuild github-actions github-runners github-webhooks self-hosted-runners terraform-cdk webhooks

Last synced: 9 months ago
JSON representation

CDKTF app that deploys a GitHub repository in a personal account, along with a repository webhook that triggers self-hosted runners in AWS CodeBuild when workflow jobs are queued

Awesome Lists containing this project

README

          

# cdktf-aws-codebuild-github-runners

CDKTF app that deploys a GitHub repository in a personal account, along with 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-organization](https://github.com/garysassano/cdktf-aws-codebuild-github-runners-organization) - Uses a GitHub organization webhook instead of repository webhook.
- [cdk-aws-codebuild-github-runners](https://github.com/garysassano/cdk-aws-codebuild-github-runners) - Built with AWS CDK instead of CDKTF.

## Prerequisites

- **_AWS:_**
- Must have authenticated with [Default Credentials](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication-and-configuration) in your local environment.
- **_GitHub:_**
- Must have set the `GITHUB_TOKEN` variable in your local environment.
- **_Terraform:_**
- Must be [installed](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli#install-terraform) in your system.
- **_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//sample-repo/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

![Architecture Diagram](./src/assets/arch.svg)