-
Notifications
You must be signed in to change notification settings - Fork 3
/
serverless.yml
41 lines (37 loc) · 1.07 KB
/
serverless.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
service: github-lambda-status-checks
# Use serverless-webpack plugin to transpile ES6/ES7
plugins:
- serverless-webpack
# Enable auto-packing of external modules
custom:
webpackIncludeModules: true
provider:
name: aws
runtime: nodejs6.10
region: eu-west-1
profile: [email protected]
iamRoleStatements:
- Effect: Allow
Action: ssm:GetParameters
Resource: '*'
functions:
githubWebhookListener:
handler: handler.githubWebhookListener
description: Listens for pull request events and checks titles
events:
- http:
path: webhook
method: post
cors: true
# Need to account for Daylight Saving
githubBlockedStatus:
handler: handler.githubBlockedStatus
description: Blocks production pull requests between 4pm-8am
events:
- schedule: cron(00 15 ? * MON-FRI *)
# Need to account for Daylight Saving
githubUnblockedStatus:
handler: handler.githubUnblockedStatus
description: Unblocks production pull requests between 8am-4pm
events:
- schedule: cron(00 07 ? * MON-FRI *)