Skip to content

Merge pull request #3 from pratham-ez/feat/billable_value #16

Merge pull request #3 from pratham-ez/feat/billable_value

Merge pull request #3 from pratham-ez/feat/billable_value #16

Workflow file for this run

# .github/workflows/deploy.yml
name: Deploy to AWS Lambda
on:
push:
branches: [main]
permissions:
id-token: write
contents: read
env:
ECR_REGISTRY: ${{ vars.ECR_REGISTRY }}
ECR_REPOSITORY: ${{ vars.ECR_REPOSITORY }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Configure AWS credentials (OIDC)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-cicd
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
- name: Build & push image (with cache)
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.ecs
platforms: linux/arm64
push: true
tags: |
${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max