@nikovirtala/cdk-codebuild-hosted-github-actions-runner 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +3965 -0
- package/API.md +193 -0
- package/LICENSE +19 -0
- package/README.md +75 -0
- package/lib/index.d.ts +31 -0
- package/lib/index.js +32 -0
- package/package.json +94 -0
package/API.md
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# API Reference <a name="API Reference" id="api-reference"></a>
|
|
2
|
+
|
|
3
|
+
## Constructs <a name="Constructs" id="Constructs"></a>
|
|
4
|
+
|
|
5
|
+
### CodebuildHostedGitHubActionsRunner <a name="CodebuildHostedGitHubActionsRunner" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner"></a>
|
|
6
|
+
|
|
7
|
+
#### Initializers <a name="Initializers" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.Initializer"></a>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { CodebuildHostedGitHubActionsRunner } from '@nikovirtala/cdk-codebuild-hosted-github-actions-runner'
|
|
11
|
+
|
|
12
|
+
new CodebuildHostedGitHubActionsRunner(scope: Construct, id: string, props: CodebuildHostedGitHubActionsRunnerProps)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
| **Name** | **Type** | **Description** |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
18
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
19
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.Initializer.parameter.props">props</a></code> | <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps">CodebuildHostedGitHubActionsRunnerProps</a></code> | *No description.* |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.Initializer.parameter.scope"></a>
|
|
24
|
+
|
|
25
|
+
- *Type:* constructs.Construct
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
##### `id`<sup>Required</sup> <a name="id" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.Initializer.parameter.id"></a>
|
|
30
|
+
|
|
31
|
+
- *Type:* string
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
##### `props`<sup>Required</sup> <a name="props" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.Initializer.parameter.props"></a>
|
|
36
|
+
|
|
37
|
+
- *Type:* <a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps">CodebuildHostedGitHubActionsRunnerProps</a>
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
42
|
+
|
|
43
|
+
| **Name** | **Description** |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
##### `toString` <a name="toString" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.toString"></a>
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
public toString(): string
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Returns a string representation of this construct.
|
|
56
|
+
|
|
57
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
58
|
+
|
|
59
|
+
| **Name** | **Description** |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.isConstruct"></a>
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import { CodebuildHostedGitHubActionsRunner } from '@nikovirtala/cdk-codebuild-hosted-github-actions-runner'
|
|
69
|
+
|
|
70
|
+
CodebuildHostedGitHubActionsRunner.isConstruct(x: any)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Checks if `x` is a construct.
|
|
74
|
+
|
|
75
|
+
###### `x`<sup>Required</sup> <a name="x" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.isConstruct.parameter.x"></a>
|
|
76
|
+
|
|
77
|
+
- *Type:* any
|
|
78
|
+
|
|
79
|
+
Any object.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
84
|
+
|
|
85
|
+
| **Name** | **Type** | **Description** |
|
|
86
|
+
| --- | --- | --- |
|
|
87
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
88
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.property.project">project</a></code> | <code>aws-cdk-lib.aws_codebuild.IProject</code> | *No description.* |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
##### `node`<sup>Required</sup> <a name="node" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.property.node"></a>
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
public readonly node: Node;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
- *Type:* constructs.Node
|
|
99
|
+
|
|
100
|
+
The tree node.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
##### `project`<sup>Required</sup> <a name="project" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner.property.project"></a>
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
public readonly project: IProject;
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- *Type:* aws-cdk-lib.aws_codebuild.IProject
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
## Structs <a name="Structs" id="Structs"></a>
|
|
116
|
+
|
|
117
|
+
### CodebuildHostedGitHubActionsRunnerProps <a name="CodebuildHostedGitHubActionsRunnerProps" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps"></a>
|
|
118
|
+
|
|
119
|
+
#### Initializer <a name="Initializer" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps.Initializer"></a>
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
import { CodebuildHostedGitHubActionsRunnerProps } from '@nikovirtala/cdk-codebuild-hosted-github-actions-runner'
|
|
123
|
+
|
|
124
|
+
const codebuildHostedGitHubActionsRunnerProps: CodebuildHostedGitHubActionsRunnerProps = { ... }
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
128
|
+
|
|
129
|
+
| **Name** | **Type** | **Description** |
|
|
130
|
+
| --- | --- | --- |
|
|
131
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps.property.repositoryName">repositoryName</a></code> | <code>string</code> | The name of the GitHub repository. |
|
|
132
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps.property.repositoryOwner">repositoryOwner</a></code> | <code>string</code> | The owner of the GitHub repository. |
|
|
133
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps.property.codeBuildProjectName">codeBuildProjectName</a></code> | <code>string</code> | The name of the CodeBuild project. |
|
|
134
|
+
| <code><a href="#@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps.property.tokenSecretArn">tokenSecretArn</a></code> | <code>string</code> | The ARN of the Secrets Manager secret containing the GitHub token. |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
##### `repositoryName`<sup>Required</sup> <a name="repositoryName" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps.property.repositoryName"></a>
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
public readonly repositoryName: string;
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
- *Type:* string
|
|
145
|
+
|
|
146
|
+
The name of the GitHub repository.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
##### `repositoryOwner`<sup>Required</sup> <a name="repositoryOwner" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps.property.repositoryOwner"></a>
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
public readonly repositoryOwner: string;
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
- *Type:* string
|
|
157
|
+
|
|
158
|
+
The owner of the GitHub repository.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
##### `codeBuildProjectName`<sup>Optional</sup> <a name="codeBuildProjectName" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps.property.codeBuildProjectName"></a>
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
public readonly codeBuildProjectName: string;
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
- *Type:* string
|
|
169
|
+
- *Default:* A name is generated based on the repository owner and name.
|
|
170
|
+
|
|
171
|
+
The name of the CodeBuild project.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
##### `tokenSecretArn`<sup>Optional</sup> <a name="tokenSecretArn" id="@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunnerProps.property.tokenSecretArn"></a>
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
public readonly tokenSecretArn: string;
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
- *Type:* string
|
|
182
|
+
- *Default:* No GitHub token is used.
|
|
183
|
+
|
|
184
|
+
The ARN of the Secrets Manager secret containing the GitHub token.
|
|
185
|
+
|
|
186
|
+
Note! CodeBuild only allows a single credential for GitHub
|
|
187
|
+
to be saved in a given AWS account in a given region -
|
|
188
|
+
any attempt to add more than one will result in an error.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2024 Niko Virtala
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Codebuild hosted GitHub Actions runner
|
|
2
|
+
|
|
3
|
+
[](https://constructs.dev/packages/@nikovirtala/cdk-codebuild-hosted-github-actions-runner)
|
|
4
|
+
|
|
5
|
+
The `cdk-codebuild-hosted-github-actions-runner` package provides a construct to create an AWS CodeBuild project that can be used to run GitHub Actions workflows.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
To install this package, use [npm](https://www.npmjs.com/), [yarn](https://yarnpkg.com/), or [pnpm](https://pnpm.io/):
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @nikovirtala/cdk-codebuild-hosted-github-actions-runner
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
yarn add @nikovirtala/cdk-codebuild-hosted-github-actions-runner
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pnpm add @nikovirtala/cdk-codebuild-hosted-github-actions-runner
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
To use this construct, you need to have an AWS Secrets Manager secret containing your GitHub Personal Access Token. This token is used to authenticate with GitHub. Use `Plaintext` type Secret value. I will add Support for `Key/value` type later.
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
github_pat_<redacted>_<redacted>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For more information on creating a GitHub token with the required scopes, refer to the [AWS CodeBuild documentation](https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens-github.html).
|
|
32
|
+
|
|
33
|
+
### Example
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { Stack, App } from "aws-cdk-lib";
|
|
37
|
+
import { CodebuildHostedGitHubActionsRunner } from "@nikovirtala/cdk-codebuild-hosted-github-actions-runner";
|
|
38
|
+
|
|
39
|
+
const app = new App();
|
|
40
|
+
const stack = new Stack(app, "MyStack");
|
|
41
|
+
|
|
42
|
+
new CodebuildHostedGitHubActionsRunner(stack, "MyRunner", {
|
|
43
|
+
repositoryOwner: "my-github-username",
|
|
44
|
+
repositoryName: "my-repo",
|
|
45
|
+
tokenSecretArn:
|
|
46
|
+
"arn:aws:secretsmanager:region:account-id:secret:my-github-token",
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## GitHub Actions Workflow
|
|
51
|
+
|
|
52
|
+
To trigger the CodeBuild project from a GitHub Actions workflow, you need to create a workflow file to `.github/workflows/` folder in your GitHub repository. Below is an example of a workflow file:
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
name: Run on Codebuild
|
|
56
|
+
|
|
57
|
+
on: [push]
|
|
58
|
+
|
|
59
|
+
jobs:
|
|
60
|
+
codebuild-job:
|
|
61
|
+
runs-on:
|
|
62
|
+
- codebuild-<<project name>>-${{ github.run_id }}-${{ github.run_attempt }}
|
|
63
|
+
- image:arm-3.0
|
|
64
|
+
- instance-size:small
|
|
65
|
+
|
|
66
|
+
steps:
|
|
67
|
+
- name: Run a script
|
|
68
|
+
run: echo "Hello, world!"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Replace `<<project name>>` with the name of your CodeBuild project. If you did not specify a `codeBuildProjectName` in the construct, the default name will be `${repositoryOwner}-${repositoryName}`.
|
|
72
|
+
|
|
73
|
+
## Properties
|
|
74
|
+
|
|
75
|
+
For detailed information about the construct properties, refer to the [API.md](./API.md) file.
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { aws_codebuild } from "aws-cdk-lib";
|
|
2
|
+
import { Construct } from "constructs";
|
|
3
|
+
export interface CodebuildHostedGitHubActionsRunnerProps {
|
|
4
|
+
/**
|
|
5
|
+
* The name of the CodeBuild project.
|
|
6
|
+
* @default - A name is generated based on the repository owner and name.
|
|
7
|
+
*/
|
|
8
|
+
readonly codeBuildProjectName?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The owner of the GitHub repository.
|
|
11
|
+
*/
|
|
12
|
+
readonly repositoryOwner: string;
|
|
13
|
+
/**
|
|
14
|
+
* The name of the GitHub repository.
|
|
15
|
+
*/
|
|
16
|
+
readonly repositoryName: string;
|
|
17
|
+
/**
|
|
18
|
+
* The ARN of the Secrets Manager secret containing the GitHub token.
|
|
19
|
+
*
|
|
20
|
+
* Note! CodeBuild only allows a single credential for GitHub
|
|
21
|
+
* to be saved in a given AWS account in a given region -
|
|
22
|
+
* any attempt to add more than one will result in an error.
|
|
23
|
+
*
|
|
24
|
+
* @default - No GitHub token is used.
|
|
25
|
+
*/
|
|
26
|
+
readonly tokenSecretArn?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class CodebuildHostedGitHubActionsRunner extends Construct {
|
|
29
|
+
readonly project: aws_codebuild.IProject;
|
|
30
|
+
constructor(scope: Construct, id: string, props: CodebuildHostedGitHubActionsRunnerProps);
|
|
31
|
+
}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CodebuildHostedGitHubActionsRunner = void 0;
|
|
5
|
+
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
6
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
7
|
+
const constructs_1 = require("constructs");
|
|
8
|
+
class CodebuildHostedGitHubActionsRunner extends constructs_1.Construct {
|
|
9
|
+
constructor(scope, id, props) {
|
|
10
|
+
super(scope, id);
|
|
11
|
+
const { codeBuildProjectName, repositoryOwner, repositoryName, tokenSecretArn } = props;
|
|
12
|
+
if (tokenSecretArn) {
|
|
13
|
+
const secret = aws_cdk_lib_1.aws_secretsmanager.Secret.fromSecretCompleteArn(this, "GitHubToken", tokenSecretArn);
|
|
14
|
+
new aws_cdk_lib_1.aws_codebuild.GitHubSourceCredentials(this, "GitHubSourceCredentials", {
|
|
15
|
+
accessToken: secret.secretValue,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
this.project = new aws_cdk_lib_1.aws_codebuild.Project(this, "Project", {
|
|
19
|
+
projectName: codeBuildProjectName ?? `${repositoryOwner}-${repositoryName}`,
|
|
20
|
+
source: aws_cdk_lib_1.aws_codebuild.Source.gitHub({
|
|
21
|
+
owner: repositoryOwner,
|
|
22
|
+
repo: repositoryName,
|
|
23
|
+
webhook: true,
|
|
24
|
+
webhookFilters: [aws_cdk_lib_1.aws_codebuild.FilterGroup.inEventOf(aws_cdk_lib_1.aws_codebuild.EventAction.WORKFLOW_JOB_QUEUED)],
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.CodebuildHostedGitHubActionsRunner = CodebuildHostedGitHubActionsRunner;
|
|
30
|
+
_a = JSII_RTTI_SYMBOL_1;
|
|
31
|
+
CodebuildHostedGitHubActionsRunner[_a] = { fqn: "@nikovirtala/cdk-codebuild-hosted-github-actions-runner.CodebuildHostedGitHubActionsRunner",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WNyZXRBcm4pO1xuXG4gICAgICAgICAgICBuZXcgYXdzX2NvZGVidWlsZC5HaXRIdWJTb3VyY2VDcmVkZW50aWFscyh0aGlzLCBcIkdpdEh1YlNvdXJjZUNyZWRlbnRpYWxzXCIsIHtcbiAgICAgICAgICAgICAgICBhY2Nlc3NUb2tlbjogc2VjcmV0LnNlY3JldFZhbHVlLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnByb2plY3QgPSBuZXcgYXdzX2NvZGVidWlsZC5Qcm9qZWN0KHRoaXMsIFwiUHJvamVjdFwiLCB7XG4gICAgICAgICAgICBwcm9qZWN0TmFtZTogY29kZUJ1aWxkUHJvamVjdE5hbWUgPz8gYCR7cmVwb3NpdG9yeU93bmVyfS0ke3JlcG9zaXRvcnlOYW1lfWAsXG4gICAgICAgICAgICBzb3VyY2U6IGF3c19jb2RlYnVpbGQuU291cmNlLmdpdEh1Yih7XG4gICAgICAgICAgICAgICAgb3duZXI6IHJlcG9zaXRvcnlPd25lcixcbiAgICAgICAgICAgICAgICByZXBvOiByZXBvc2l0b3J5TmFtZSxcbiAgICAgICAgICAgICAgICB3ZWJob29rOiB0cnVlLFxuICAgICAgICAgICAgICAgIHdlYmhvb2tGaWx0ZXJzOiBbYXdzX2NvZGVidWlsZC5GaWx0ZXJHcm91cC5pbkV2ZW50T2YoYXdzX2NvZGVidWlsZC5FdmVudEFjdGlvbi5XT1JLRkxPV19KT0JfUVVFVUVEKV0sXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgfSk7XG4gICAgfVxufVxuIl19
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nikovirtala/cdk-codebuild-hosted-github-actions-runner",
|
|
3
|
+
"description": "A construct to create an AWS CodeBuild project that can be used to run GitHub Actions workflows",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/nikovirtala/cdk-codebuild-hosted-github-actions-runner.git"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "npx projen build",
|
|
10
|
+
"bump": "npx projen bump",
|
|
11
|
+
"clobber": "npx projen clobber",
|
|
12
|
+
"compat": "npx projen compat",
|
|
13
|
+
"compile": "npx projen compile",
|
|
14
|
+
"default": "npx projen default",
|
|
15
|
+
"docgen": "npx projen docgen",
|
|
16
|
+
"eject": "npx projen eject",
|
|
17
|
+
"eslint": "npx projen eslint",
|
|
18
|
+
"package": "npx projen package",
|
|
19
|
+
"package-all": "npx projen package-all",
|
|
20
|
+
"package:js": "npx projen package:js",
|
|
21
|
+
"post-compile": "npx projen post-compile",
|
|
22
|
+
"post-upgrade": "npx projen post-upgrade",
|
|
23
|
+
"pre-compile": "npx projen pre-compile",
|
|
24
|
+
"release": "npx projen release",
|
|
25
|
+
"test": "npx projen test",
|
|
26
|
+
"unbump": "npx projen unbump",
|
|
27
|
+
"upgrade": "npx projen upgrade",
|
|
28
|
+
"watch": "npx projen watch",
|
|
29
|
+
"projen": "npx projen"
|
|
30
|
+
},
|
|
31
|
+
"author": {
|
|
32
|
+
"name": "Niko Virtala",
|
|
33
|
+
"email": "niko.virtala@hey.com",
|
|
34
|
+
"organization": false
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^22.10.1",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^8",
|
|
39
|
+
"@typescript-eslint/parser": "^8",
|
|
40
|
+
"aws-cdk-lib": "2.146.0",
|
|
41
|
+
"commit-and-tag-version": "^12",
|
|
42
|
+
"constructs": "10.0.5",
|
|
43
|
+
"eslint": "^9",
|
|
44
|
+
"eslint-config-prettier": "^9.1.0",
|
|
45
|
+
"eslint-import-resolver-typescript": "^3.7.0",
|
|
46
|
+
"eslint-plugin-import": "^2.31.0",
|
|
47
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
48
|
+
"jsii": "~5.5.0",
|
|
49
|
+
"jsii-diff": "^1.105.0",
|
|
50
|
+
"jsii-docgen": "^10.5.0",
|
|
51
|
+
"jsii-pacmak": "^1.105.0",
|
|
52
|
+
"jsii-rosetta": "~5.5.0",
|
|
53
|
+
"prettier": "^3.4.2",
|
|
54
|
+
"projen": "^0.90.6",
|
|
55
|
+
"ts-node": "^10.9.2",
|
|
56
|
+
"typescript": "^5.7.2"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"aws-cdk-lib": "^2.146.0",
|
|
60
|
+
"constructs": "^10.0.5"
|
|
61
|
+
},
|
|
62
|
+
"keywords": [
|
|
63
|
+
"aws",
|
|
64
|
+
"aws-cdk",
|
|
65
|
+
"awscdk",
|
|
66
|
+
"cdk",
|
|
67
|
+
"codebuild",
|
|
68
|
+
"gha",
|
|
69
|
+
"github",
|
|
70
|
+
"github-actions",
|
|
71
|
+
"runner"
|
|
72
|
+
],
|
|
73
|
+
"main": "lib/index.js",
|
|
74
|
+
"license": "MIT",
|
|
75
|
+
"publishConfig": {
|
|
76
|
+
"access": "public"
|
|
77
|
+
},
|
|
78
|
+
"version": "1.0.0",
|
|
79
|
+
"types": "lib/index.d.ts",
|
|
80
|
+
"stability": "stable",
|
|
81
|
+
"jsii": {
|
|
82
|
+
"outdir": "dist",
|
|
83
|
+
"targets": {},
|
|
84
|
+
"tsc": {
|
|
85
|
+
"outDir": "lib",
|
|
86
|
+
"rootDir": "src"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"awscdkio": {
|
|
90
|
+
"twitter": "nikovirtala",
|
|
91
|
+
"announce": true
|
|
92
|
+
},
|
|
93
|
+
"//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"."
|
|
94
|
+
}
|