-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 2.02 KB
/
lambda_deployments_prod.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
37
38
name: Lambda Trigger PROD CICD Deployment
on:
push:
branches:
- main
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Zip functions
run: |
cd modules/lambda_functions
zip -r bgg_scraper_fargate_trigger.zip bgg_scraper_fargate_trigger.py ../../config.py ../../utils
zip -r bgg_game_data_cleaner_fargate_trigger.zip bgg_game_data_cleaner_fargate_trigger.py ../../config.py ../../utils
zip -r generate_game_urls_lambda.zip generate_game_urls_lambda.py ../../config.py ../../utils
zip -r generate_user_urls_lambda.zip generate_user_urls_lambda.py ../../config.py ../../utils
zip -r bgg_orchestrator_fargate_trigger.zip bgg_orchestrator_fargate_trigger.py ../../config.py ../../utils
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_GITHUB_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Post Lambda Functions
run: |
cd modules/lambda_functions
aws lambda update-function-code --function-name=bgg_scraper_fargate_trigger --zip-file=fileb://bgg_scraper_fargate_trigger.zip > /dev/null 2>&1
aws lambda update-function-code --function-name=bgg_game_data_cleaner_fargate_trigger --zip-file=fileb://bgg_game_data_cleaner_fargate_trigger.zip > /dev/null 2>&1
aws lambda update-function-code --function-name=bgg_generate_game_urls --zip-file=fileb://generate_game_urls_lambda.zip > /dev/null 2>&1
aws lambda update-function-code --function-name=bgg_generate_user_urls --zip-file=fileb://generate_user_urls_lambda.zip > /dev/null 2>&1
aws lambda update-function-code --function-name=bgg_orchestrator_fargate_trigger --zip-file=fileb://bgg_orchestrator_fargate_trigger.zip > /dev/null 2>&1