Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudgardener/cdk-aws-fargate-github-actions-runner
CDK construct library to deploy GitHub Actions self-hosted runner to AWS Fargate.
https://github.com/cloudgardener/cdk-aws-fargate-github-actions-runner
aws aws-cdk aws-ecs aws-fargate aws-fargate-application cdk cdk-construct ecs github-actions github-actions-runner
Last synced: about 2 months ago
JSON representation
CDK construct library to deploy GitHub Actions self-hosted runner to AWS Fargate.
- Host: GitHub
- URL: https://github.com/cloudgardener/cdk-aws-fargate-github-actions-runner
- Owner: cloudgardener
- License: mit
- Created: 2021-10-02T20:47:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-29T01:03:23.000Z (about 1 year ago)
- Last Synced: 2024-07-03T10:24:43.635Z (3 months ago)
- Topics: aws, aws-cdk, aws-ecs, aws-fargate, aws-fargate-application, cdk, cdk-construct, ecs, github-actions, github-actions-runner
- Language: TypeScript
- Homepage:
- Size: 1.38 MB
- Stars: 16
- Watchers: 3
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cdk-aws-fargate-github-actions-runner
[![View on Construct Hub](https://constructs.dev/badge?package=%40cloudgardener%2Fcdk-aws-fargate-github-actions-runner)](https://constructs.dev/packages/@cloudgardener/cdk-aws-fargate-github-actions-runner)
CDK construct library to deploy [GitHub Actions self-hosted runner](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners) to AWS Fargate.
This is continuation to [`cdk-github-actions-runner`](https://github.com/nikovirtala/cdk-github-actions-runner) proof-of-concept.
## Example
```ts
import { App, Stack, aws_ecs as ecs, aws_ssm as ssm } from "aws-cdk-lib";
import { GithubActionsRunner } from "@cloudgardener/cdk-aws-fargate-github-actions-runner";const app = new App();
const stack = new Stack(app, "stack");// Get GitHub token e.g. from SSM Parameter Store
const token = ecs.Secret.fromSsmParameter(
ssm.StringParameter.fromSecureStringParameterAttributes(
stack,
"GitHubAccessToken",
{
parameterName: "GITHUB_ACCESS_TOKEN",
version: 0,
}
)
);// Assign runner to repository
const context = "https://github.com/cloudgardener/runner-demo";// Runners can be also assigned to organization
// const context = "https://github.com/cloudgardener";// Deploy the runner
new GithubActionsRunner(stack, "runner", {
githubToken: token,
runnerContext: context,
});
```