-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.19 KB
/
deploy.yml
File metadata and controls
43 lines (36 loc) · 1.19 KB
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
name: Deploy Lambda
on:
push:
branches: [ main, dev ]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'corretto'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build jar
run: ./gradlew jar
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ap-northeast-2
- name: Deploy to Lambda
run: |
aws lambda update-function-code \
--function-name auction-sqs-handler \
--zip-file fileb://build/libs/auction-lambda-0.0.1-SNAPSHOT.jar
aws lambda update-function-code \
--function-name auction-sqs-consumer \
--zip-file fileb://build/libs/auction-lambda-0.0.1-SNAPSHOT.jar
aws lambda update-function-code \
--function-name auction-scheduler \
--zip-file fileb://build/libs/auction-lambda-0.0.1-SNAPSHOT.jar