Skip to content

Celery: Update testcases mock (#721) #31

Celery: Update testcases mock (#721)

Celery: Update testcases mock (#721) #31

Workflow file for this run

name: Deploy Kaapi to ECS Production
on:
push:
tags:
- 'v*' # Deploy only when tags like v1.0.0, v2.1.0, etc., are created
jobs:
build:
runs-on: ubuntu-latest
environment: AWS_ENV_VARS
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout the repo
uses: actions/checkout@v6
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6 # More information on this action can be found below in the 'AWS Credentials' section
with:
role-to-assume: arn:aws:iam::024209611402:role/github-action-role
aws-region: ap-south-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build and Push Docker Image
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: ${{ vars.AWS_RESOURCE_PREFIX }}-repo
TAG: ${{ github.ref_name }}
run: |
docker build -t $REGISTRY/$REPOSITORY:latest ./backend
docker push $REGISTRY/$REPOSITORY:latest
- name: Deploy to ECS
run: |
aws ecs update-service \
--cluster ${{ vars.AWS_RESOURCE_PREFIX }}-cluster \
--service ${{ vars.AWS_RESOURCE_PREFIX }}-service \
--force-new-deployment