-
-
Notifications
You must be signed in to change notification settings - Fork 13
45 lines (40 loc) · 1.44 KB
/
deploy-lambda.yml
File metadata and controls
45 lines (40 loc) · 1.44 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
name: Deploy Lambda function
on:
workflow_call:
inputs:
function_name:
description: "The name of the function to deploy"
required: true
type: string
image_name:
description: "The name of the image to deploy (default: repo name)"
required: false
type: string
secrets:
AWS_ACCOUNT_ID:
description: "The AWS account ID used to determine the ECR registry"
required: true
AWS_REGION:
description: "The AWS region used to determine the ECR registry"
required: true
AWS_ECR_ACCESS_KEY_ID:
description: "The access key ID used to log into AWS ECR"
required: true
AWS_ECR_SECRET_ACCESS_KEY:
description: "The secret access key ID used to log into AWS ECR"
required: true
permissions: {}
jobs:
deploy:
runs-on: ubuntu-22.04
env:
ECR_REGISTRY: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com
steps:
- name: Deploy lambda
uses: appleboy/lambda-action@bdbe5c99e38d855e0fa2ae1aba355da64c860a57
with:
aws_access_key_id: ${{ secrets.AWS_ECR_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_ECR_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: ${{ inputs.function_name }}
image_uri: ${{ env.ECR_REGISTRY }}/${{ inputs.image_name || github.event.repository.name }}:production