We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39ccc95 commit 7cdbd14Copy full SHA for 7cdbd14
scripts/dispatch.js
@@ -0,0 +1,30 @@
1
+const http = require('https');
2
+const querystring = require('querystring');
3
+
4
+var options = {
5
+ host: 'api.github.com',
6
+ port: 443,
7
+ path: '/repos/hmanzur/terraform-aws-ecs-test/dispatches',
8
+ method: 'POST',
9
+ headers: {
10
+ 'Accept': 'application/vnd.github.v3+json',
11
+ 'Authorization': `token ${process.env.AUTH_TOKEN}`
12
+ }
13
+}
14
15
16
+const request = http.request(options, response => {
17
+ response.on('data', function (chunk) {
18
+ process.stdout.write(chunk);
19
+ });
20
+});
21
22
+request.on('error', (e) => {
23
+ console.error(e);
24
25
26
+request.write(querystring.stringify({
27
+ event_type: 'build'
28
+}));
29
30
+request.end();
0 commit comments