CloudSnorkel / cdk-github-runners

CDK constructs for self-hosted GitHub Actions runners
https://constructs.dev/packages/@cloudsnorkel/cdk-github-runners/
Apache License 2.0
255 stars 37 forks source link

feat: Allow full customization of runner images and periodically update them #47

Closed kichik closed 1 year ago

kichik commented 1 year ago

Build images in AWS using CodeBuild (or any user configured method) so that:

  1. We can automatically update images on a schedule to get the latest runner version and latest OS updates.
  2. We can build any type of image independent of the deployment platform. This will make it easy to provide Windows or ARM images (closes #7).
  3. We can expose an interface allowing the user to easily modify the Docker images by adding packages or commands to the build process (closes #26).

BREAKING CHANGE: providers no longer take runner version directly

kichik commented 1 year ago

See the updated readme for usage.

sercantor commented 1 year ago

Would it be more obvious to have a matching provider label for self-hosted.yml and the readme? Like:

// create a custom CodeBuild provider
const myProvider = new CodeBuildRunner(this, 'codebuild runner', { 
    label: 'codebuild-x64',
    ...
});
// grant some permissions to the provider
...

// create the runner infrastructure
new GitHubRunners(this, 'runners', {
    providers: [codebuild-x64],
});

I'm just suggesting it because there may be people copying from the readme and not seeing their workers running because the labels don't match when they run their workflow against self.hosted.yml. Also makes it obvious for people to see that there are options for architecture.

Again, it's just a suggestion 🤷

kichik commented 1 year ago

That's a good point. I keep forgetting to add proper workflow example. self-hosted.yml is not an ideal example. It's way too complex.

sercantor commented 1 year ago

great commit, it's definitely more readable now, thanks for all the work 👍