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