Skip to content

Feat: Implement the backend part of issue #1449 (#1484) #10

Feat: Implement the backend part of issue #1449 (#1484)

Feat: Implement the backend part of issue #1449 (#1484) #10

Workflow file for this run

name: Rag Server Deploy
on:
push:
branches:
- main
paths:
- '.github/workflows/rag-**'
- 'extensions/observatory'
- 'extensions/rag/**'
env:
AWS_ECS_CLUSTER_NAME: ${{ secrets.AWS_ECS_CLUSTER_NAME }}
AWS_ECS_WEB_SERVICE_NAME: ${{ secrets.AWS_ECS_WEB_SERVICE_NAME }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rag-server-deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
project:
- extensions/rag/chat
- extensions/rag/index
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Build, tag, and push docker image to Amazon ECR Public
env:
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
REGISTRY_ALIAS: m8q5m4u3
REPOSITORY: mega
run: |
project_name=$(basename "${{ matrix.project }}")
IMAGE_TAG="rag-${project_name}-0.1.0-pre-release"
echo "Building image: $IMAGE_TAG"
docker buildx build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG -f ${{ matrix.project }}/Dockerfile .
docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG