@@ -65,9 +65,14 @@ You can also create your own provider by implementing `IRunnerProvider`.
65
65
```
66
66
### Use
67
67
``` python
68
+ from aws_cdk import App, Stack
68
69
from cloudsnorkel.cdk_github_runners import GitHubRunners
69
70
70
- GitHubRunners(self , " runners" )
71
+ app = App()
72
+ stack = Stack(app, " github-runners" )
73
+ GitHubRunners(stack, " runners" )
74
+
75
+ app.synth()
71
76
```
72
77
</details >
73
78
<details ><summary >TypeScript or JavaScript</summary >
@@ -79,9 +84,14 @@ You can also create your own provider by implementing `IRunnerProvider`.
79
84
```
80
85
### Use
81
86
``` typescript
87
+ import { App , Stack } from ' aws-cdk-lib' ;
82
88
import { GitHubRunners } from ' @cloudsnorkel/cdk-github-runners' ;
83
89
84
- new GitHubRunners (this , " runners" );
90
+ const app = new App ();
91
+ const stack = new Stack (app , ' github-runners' );
92
+ new GitHubRunners (stack , ' runners' );
93
+
94
+ app .synth ();
85
95
```
86
96
</details >
87
97
<details ><summary >Java</summary >
@@ -96,9 +106,19 @@ You can also create your own provider by implementing `IRunnerProvider`.
96
106
```
97
107
### Use
98
108
``` java
109
+ import software.amazon.awscdk.App ;
110
+ import software.amazon.awscdk.Stack ;
99
111
import com.cloudsnorkel.cdk.github.runners.GitHubRunners ;
100
112
101
- GitHubRunners . Builder . create(this , " runners" ). build();
113
+ public class Example {
114
+ public static void main (String [] args ){
115
+ App app = new App ();
116
+ Stack stack = new Stack (app, " github-runners" );
117
+ GitHubRunners . Builder . create(stack, " runners" ). build();
118
+
119
+ app. synth();
120
+ }
121
+ }
102
122
```
103
123
</details >
104
124
<details ><summary >Go</summary >
@@ -110,9 +130,21 @@ You can also create your own provider by implementing `IRunnerProvider`.
110
130
```
111
131
### Use
112
132
``` go
113
- import " github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"
133
+ package main
134
+
135
+ import (
136
+ " github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"
137
+ " github.com/aws/aws-cdk-go/awscdk/v2"
138
+ " github.com/aws/jsii-runtime-go"
139
+ )
140
+
141
+ func main () {
142
+ app := awscdk.NewApp (nil )
143
+ stack := awscdk.NewStack (app, jsii.String (" github-runners" ), &awscdk.StackProps {})
144
+ cloudsnorkelcdkgithubrunners.NewGitHubRunners (stack, jsii.String (" runners" ), &cloudsnorkelcdkgithubrunners.GitHubRunnersProps {})
114
145
115
- NewGitHubRunners (this, jsii.String (" runners" ))
146
+ app.Synth (nil )
147
+ }
116
148
```
117
149
</details >
118
150
<details ><summary >.NET</summary >
@@ -124,9 +156,22 @@ You can also create your own provider by implementing `IRunnerProvider`.
124
156
```
125
157
### Use
126
158
``` csharp
159
+ using Amazon .CDK ;
127
160
using CloudSnorkel ;
128
161
129
- new GitHubRunners (this , " runners" );
162
+ namespace Example
163
+ {
164
+ sealed class Program
165
+ {
166
+ public static void Main (string [] args )
167
+ {
168
+ var app = new App ();
169
+ var stack = new Stack (app , " github-runners" );
170
+ new GitHubRunners (stack , " runners" );
171
+ app .Synth ();
172
+ }
173
+ }
174
+ }
130
175
```
131
176
</details >
132
177
2 . Use ` GitHubRunners ` construct in your code (starting with default arguments is fine)
0 commit comments