-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (39 loc) · 1.09 KB
/
Copy pathdeploy.yml
File metadata and controls
50 lines (39 loc) · 1.09 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
name: Deploy Lambda
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Add any Python dependencies here if needed
- name: Create deployment package
run: zip -r lambda_function.zip lambda_function.py
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.OIDC_ROLE_TO_ASSUME }}
aws-region: us-east-2
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.10.0
- name: Terraform Init
run: terraform init
working-directory: infra
- name: Terraform Apply
run: terraform apply -auto-approve
working-directory: infra