Issue #906: Phase A: Stand up LDE microservice (#920) #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy LIF MDR API to Amazon ECS | |
| env: | |
| AWS_REGION: us-east-1 | |
| GHA_ROLE: "arn:aws:iam::381492161417:role/lif-github-actions-dev" | |
| ECS_CLUSTER: dev | |
| ECS_SERVICE: mdr-api-FARGATE | |
| permissions: | |
| id-token: write | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - .github/workflows/lif_mdr_api.yml | |
| - bases/lif/mdr_restapi/** | |
| - components/lif/datatypes/mdr_sqlmodel | |
| - components/lif/mdr_auth/** | |
| - components/lif/mdr_dto/** | |
| - components/lif/mdr_services/** | |
| - components/lif/mdr_utils/** | |
| jobs: | |
| mdr-api: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| WORKING_DIR: ./projects/lif_mdr_api | |
| ECR_REPOSITORY: lif/dev/lif_mdr_api | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build the project | |
| shell: bash | |
| working-directory: ${{ env.WORKING_DIR }} | |
| run: | | |
| curl -LsSf https://astral.sh/uv/0.7.15/install.sh | sh | |
| ./build.sh | |
| - name: Build and push docker image | |
| uses: ./.github/actions/build-and-push | |
| with: | |
| working-dir: ${{ env.WORKING_DIR }} | |
| github-actions-role: ${{ env.GHA_ROLE }} | |
| role-session-name: mdr-api-build | |
| aws-region: ${{ env.AWS_REGION }} | |
| ecr-repository: ${{ env.ECR_REPOSITORY }} | |
| - name: Update the MDR API ECS service | |
| uses: ./.github/actions/update-cluster | |
| with: | |
| github-actions-role: ${{ env.GHA_ROLE }} | |
| role-session-name: mdr-api-ecs | |
| aws-region: ${{ env.AWS_REGION }} | |
| ecs-cluster: ${{ env.ECS_CLUSTER }} | |
| ecs-service: ${{ env.ECS_SERVICE }} | |