-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.yml
60 lines (57 loc) · 1.44 KB
/
template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: Serverless GitHub app
Parameters:
awsRole:
Description: The AWS ARN role
Type: String
secretId:
Description: The AWS Secret ID
Type: String
functionName:
Description: The AWS Lambda's Function name
Type: String
githubOwner:
Description: The repository owner
Type: String
githubRepository:
Description: The name of the repository
Type: String
githubWorkflowName:
Description: The workflow name
Type: String
githubBranch:
Description: The branch name
Type: String
githubJobFilter:
Description: The Job Filter
Type: String
Resources:
webhooks:
Type: AWS::Serverless::Function
Properties:
FunctionName: !Ref functionName
Description: Basic Auth Funtion
CodeUri: .
Handler: handler.webhooks
Role: !Ref awsRole
Runtime: nodejs16.x
MemorySize: 256
Timeout: 20
PackageType: Zip
Tags:
map-migrated: d-server-01068mdjl5jze3
Events:
ApiEvent:
Type: HttpApi
Properties:
Path: /ghrunner-app
Method: post
Environment:
Variables:
OWNER: !Ref githubOwner
REPO: !Ref githubRepository
WORKFLOW_FILE_NAME: !Ref githubWorkflowName
BRANCH: !Ref githubBranch
JOB_FILTER: !Ref githubJobFilter
SECRET_ID : !Ref secretId