mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-08 11:17:29 +00:00
added deployment of ecr first
This commit is contained in:
parent
9204074eb8
commit
efebfb5baa
2 changed files with 20 additions and 0 deletions
8
.github/workflows/actions/lambda/action.yml
vendored
8
.github/workflows/actions/lambda/action.yml
vendored
|
|
@ -8,6 +8,9 @@ inputs:
|
|||
dockerfile_path:
|
||||
description: "Path to Dockerfile"
|
||||
required: true
|
||||
ecr_tf_dir:
|
||||
description: "Path to ECR terrform directory"
|
||||
required: true
|
||||
aws_region:
|
||||
description: "AWS region"
|
||||
required: false
|
||||
|
|
@ -29,6 +32,11 @@ runs:
|
|||
id: login-ecr
|
||||
uses: aws-actions/amazon-ecr-login@v2
|
||||
|
||||
- name: Deploy ECR
|
||||
uses: ./.github/actions/terraform-deploy
|
||||
with:
|
||||
working_directory: ${{ inputs.ecr_tf_dir }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
|
|||
12
.github/workflows/lambda_main.yml
vendored
12
.github/workflows/lambda_main.yml
vendored
|
|
@ -8,8 +8,17 @@ env:
|
|||
AWS_REGION: eu-west-2
|
||||
|
||||
jobs:
|
||||
shared-lambda-terraform:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy shared Lambda Config Terraform
|
||||
uses: ./.github/actions/terraform-deploy
|
||||
with:
|
||||
working_directory: deployment/lambda_shared
|
||||
|
||||
lambda-ecr-example:
|
||||
runs-on: ubuntu-latest
|
||||
needs: shared-lambda-terraform
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
|
@ -20,9 +29,11 @@ jobs:
|
|||
with:
|
||||
lambda_name: lambda_example
|
||||
dockerfile_path: deployment/lambda/lambda_example/docker/Dockerfile
|
||||
ecr_tf_dir: deployment/lambda/lambda_example/docker/
|
||||
|
||||
extractor-and-loader:
|
||||
runs-on: ubuntu-latest
|
||||
needs: shared-lambda-terraform
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
|
@ -33,3 +44,4 @@ jobs:
|
|||
with:
|
||||
lambda_name: extractor_and_loader
|
||||
dockerfile_path: deployment/lambda/extractor_and_loader/docker/Dockerfile
|
||||
ecr_tf_dir: deployment/lambda/extractor_and_loader/docker/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue