added deployment of ecr first

This commit is contained in:
Jun-te Kim 2025-07-18 10:51:52 +00:00
parent 9204074eb8
commit efebfb5baa
2 changed files with 20 additions and 0 deletions

View file

@ -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: |

View file

@ -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/