Skip to content

Merge pull request #10 from A3Data/feature/ajustes-pre-v0 #24

Merge pull request #10 from A3Data/feature/ajustes-pre-v0

Merge pull request #10 from A3Data/feature/ajustes-pre-v0 #24

name: Pipeline de Deploy Lambda
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.8.0
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: "arn:aws:iam::340752815603:role/oidc-github-framework-eml-role"
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_REGION }}
- name: Create ECR
run: |
chmod +x deployment/scripts/create_ecr.sh
./deployment/scripts/create_ecr.sh ${{ env.REPO_NAME }} ${{ env.AWS_REGION }}
- name: Build and push image
run: |
chmod +x deployment/scripts/push_image_lambda.sh
./deployment/scripts/push_image_lambda.sh ${{ env.REPO_NAME }} ${{ env.AWS_REGION }}
- name: Create infra and deploy
run: |
chmod +x deployment/scripts/create_infra_lambda.sh
./deployment/scripts/create_infra_lambda.sh ${{ env.AWS_REGION }}
env:
REPO_NAME: "eml-online-repo"
AWS_REGION: "us-east-1"