forked from jenseickmeyer/github-commit-status-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.yaml
More file actions
33 lines (31 loc) · 970 Bytes
/
template.yaml
File metadata and controls
33 lines (31 loc) · 970 Bytes
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Lambda function for updating the commit status on GitHub based on CodePipeline execution state changes.
Resources:
StatusUpdateFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: index.handler
Runtime: nodejs12.x
Timeout: 3
Policies:
- AWSCodePipelineReadOnlyAccess
- AWSLambdaBasicExecutionRole
Environment:
Variables:
ACCESS_TOKEN: "{{resolve:ssm:/github/personal_access_token:1}}"
Events:
Event:
Type: CloudWatchEvent
Properties:
Pattern:
source:
- aws.codepipeline
detail-type:
- "CodePipeline Pipeline Execution State Change"
detail:
state:
- "STARTED"
- "SUCCEEDED"
- "FAILED"