Issue #906: Phase A: Stand up LDE microservice (#920) #9
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 Query Planner 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_ORG1: query-planner-org1-FARGATE | |
| ECS_SERVICE_ORG2: query-planner-org2-FARGATE | |
| ECS_SERVICE_ORG3: query-planner-org3-FARGATE | |
| permissions: | |
| id-token: write | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - .github/workflows/lif_query_planner_api.yml | |
| - bases/lif/query_planner_restapi/** | |
| - cloudformation/dev-lif-query-planner.params | |
| - cloudformation/lif-query-planner-taskdef-includes.yml | |
| - components/lif/query_planner_service/** | |
| - components/lif/datatypes/** | |
| - components/lif/logging/** | |
| - projects/lif_query_planner_api/** | |
| jobs: | |
| lif-query-planner-api: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| WORKING_DIR: ./projects/lif_query_planner_api | |
| ECR_REPOSITORY: lif/dev/lif_query_planner_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: query-planner-api-build | |
| aws-region: ${{ env.AWS_REGION }} | |
| ecr-repository: ${{ env.ECR_REPOSITORY }} | |
| - name: Update the query-planner-org1 ECS Service | |
| uses: ./.github/actions/update-cluster | |
| with: | |
| github-actions-role: ${{ env.GHA_ROLE }} | |
| role-session-name: query-planner-org1-ecs | |
| aws-region: ${{ env.AWS_REGION }} | |
| ecs-cluster: ${{ env.ECS_CLUSTER }} | |
| ecs-service: ${{ env.ECS_SERVICE_ORG1 }} | |
| - name: Update the query-planner-org2 ECS Service | |
| uses: ./.github/actions/update-cluster | |
| with: | |
| github-actions-role: ${{ env.GHA_ROLE }} | |
| role-session-name: query-planner-org2-ecs | |
| aws-region: ${{ env.AWS_REGION }} | |
| ecs-cluster: ${{ env.ECS_CLUSTER }} | |
| ecs-service: ${{ env.ECS_SERVICE_ORG2 }} | |
| - name: Update the query-planner-org3 ECS Service | |
| uses: ./.github/actions/update-cluster | |
| with: | |
| github-actions-role: ${{ env.GHA_ROLE }} | |
| role-session-name: query-planner-org3-ecs | |
| aws-region: ${{ env.AWS_REGION }} | |
| ecs-cluster: ${{ env.ECS_CLUSTER }} | |
| ecs-service: ${{ env.ECS_SERVICE_ORG3 }} | |