-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.13 KB
/
Copy pathdeploy-lambda.yaml
File metadata and controls
48 lines (43 loc) · 1.13 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
name: Deploy Lambda to AWS
on:
push:
branches: ["*-workshop"]
paths:
- .github/**
- lambda/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
AWS_REGION: eu-west-1
jobs:
deploy:
runs-on: ubuntu-latest
env:
FUNCTION_NAME: ${{ github.ref_name }}
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ env.AWS_REGION }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: lambda/package-lock.json
- name: Install dependencies
working-directory: ./lambda
run: npm ci
- name: Build TypeScript
working-directory: ./lambda
run: npm run build
- name: Package Lambda function
working-directory: ./lambda
run: npm run package