forked from asmbly-makerspace/NeonIntegrations
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.51 KB
/
Copy pathlambda_deploy.yml
File metadata and controls
60 lines (49 loc) · 1.51 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Deploy Alta Open Lambda
on:
push:
branches:
- main
env:
AWS_REGION: us-east-2
ALTA_OPEN_LAMBDA_ECR_REPO: alta-open-lambda
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
jobs:
build-push-deploy:
if: ${{ github.repository == 'asmbly-makerspace/NeonIntegrations' }}
runs-on: ubuntu-latest
name: Build, push, and deploy Alta Open Lambda
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ secrets.AWS_GITHUB_ACTIONS_ROLE }}
aws-region: ${{ env.AWS_REGION }}
- name: Login to ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
platforms: linux/arm64
context: .
provenance: false
file: ./alta_open_lambda/Dockerfile
push: true
tags: ${{ steps.login-ecr.outputs.registry }}/${{ env.ALTA_OPEN_LAMBDA_ECR_REPO }}:latest
- name: Deploy
uses: aws-actions/aws-lambda-deploy@v1.1.0
with:
function-name: alta-open-update
package-type: Image
architectures: arm64
image-uri: ${{ steps.login-ecr.outputs.registry }}/${{ env.ALTA_OPEN_LAMBDA_ECR_REPO }}:latest
timeout: 20