Skip to content

Add Lambda function and configure deployment #1

Add Lambda function and configure deployment

Add Lambda function and configure deployment #1

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: build docker image
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build, tag, and push image to Amazon ECR
run: |
cd demo/lambda/src
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA -f Dockerfile .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA