This is the simplest example of using the CDK GitHub Runners library with just a CodeBuild provider.
- Creates a CodeBuild provider with default settings
- Sets up the complete GitHub runners infrastructure
- Uses labels:
codebuild,linux,x64
-
Install dependencies:
npm install
-
Deploy the stack:
cdk deploy
-
Follow the setup instructions in the main README.md to configure GitHub integration
Use this in your GitHub Actions workflow:
name: Test on CodeBuild
on: push
jobs:
test:
runs-on: [self-hosted, codebuild]
steps:
- uses: actions/checkout@v5
- name: Run tests
run: echo "Hello from CodeBuild runner!"To remove all resources:
cdk destroy