-
-
Notifications
You must be signed in to change notification settings - Fork 58
133 lines (123 loc) · 4.43 KB
/
ci.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: deploy to lambda
on: [push]
jobs:
deploy_zip:
name: deploy lambda function from zip
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.22"]
steps:
- name: checkout source code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build binary
run: |
cd example && GOOS=linux go build -v -a -o main main.go && zip deployment.zip main
- name: deploy zip
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
runtime: nodejs20.x
zip_file: example/deployment.zip
- name: update env
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
environment: foo=bar,author=appleboy
debug: true
- name: update config
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
memory_size: 128
timeout: 10
# origin value is "hello"
handler: foobar
- name: dry run
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
dry_run: true
- name: update role
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
role: arn:aws:iam::502946233425:role/service-role/gorush-role-8nb845iz
dry_run: true
- name: deploy description
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
description: update description from github actions
- name: check publish flag
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
publish: false
- name: check max attempts flag
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
zip_file: example/deployment.zip
debug: true
publish: false
max_attempts: 200
- name: deploy source code
uses: ./
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
source: example/main.go,example/go.mod,example/go.sum
# Todo: update subnets and security groups
# - name: update subnets and security groups
# uses: ./
# with:
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws_region: ${{ secrets.AWS_REGION }}
# function_name: gorush
# source: example/main.go,example/go.mod,example/go.sum
# subnets: subnet-05905c9e0ffb7e552
# securitygroups: sg-0262ba785ced7600e
# debug: true