-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (35 loc) · 1.12 KB
/
data-sink-lambda.yml
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
name: datasink-module-to-lambda
on:
push:
paths:
- "Backend_build/DataSink**"
jobs:
update-datasink:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./Backend_build
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Build container
run: |
docker compose build data-sink-module-final
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Push2ECR
id: ecr
uses: jwalton/gh-ecr-push@v1
with:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: eu-central-1
image: data-sink-module-final:latest
- name: Update lambda with image
run: aws lambda update-function-code --function-name data-sink --image-uri 355622878315.dkr.ecr.eu-central-1.amazonaws.com/data-sink-module-final:latest