-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.09 KB
/
Copy pathdeploy-lambda.yml
File metadata and controls
46 lines (38 loc) · 1.09 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
44
45
46
name: Deploy Staging Lambda
on:
push:
branches:
- main
permissions:
contents: read
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
environment: staging
env:
AWS_REGION: ${{ secrets.AWS_REGION_STAGING }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN_STAGING }}
LAMBDA_FUNCTION_NAME: ${{ secrets.LAMBDA_FUNCTION_NAME_STAGING }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run tests
run: go test ./...
- name: Package Lambda artifact
run: make package-lambda
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ env.AWS_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}
- name: Deploy Lambda
run: |
aws lambda update-function-code \
--function-name "$LAMBDA_FUNCTION_NAME" \
--zip-file fileb://dist/lambda/appbuilder-grader-lambda.zip \
--publish