-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 1.05 KB
/
lambda.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
name: Deploy to lambda
on:
push:
tags: ['*']
jobs:
deploy_zip:
name: deploy lambda function
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.22]
steps:
- name: checkout source code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Build binary
run: |
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o bootstrap -tags lambda.norpc main.go && zip linebotFunction.zip bootstrap
- name: default deploy
uses: appleboy/[email protected]
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: linebotFunction
zip_file: linebotFunction.zip
memory_size: 256
timeout: 30
handler: bootstrap
role: ${{ secrets.AWS_LAMBDA_ROLE }}
runtime: provided.al2023