Initial public release #1
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 Example Data Source REST 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: example-data-source-rest-api-FARGATE | |
| permissions: | |
| id-token: write | |
| contents: read | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - .github/workflows/lif_example_data_source_rest_api.yml | |
| - bases/lif/example_data_source_rest_api/** | |
| - cloudformation/dev-lif-example-data-source-rest-api.params | |
| - cloudformation/lif-example-data-source-rest-api-taskdef-includes.yml | |
| - components/lif/example_data_source_service/** | |
| - components/lif/logging/** | |
| - components/lif/auth/** | |
| - projects/lif_example_data_source_rest_api/** | |
| jobs: | |
| lif-example-data-source-rest-api: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| WORKING_DIR: ./projects/lif_example_data_source_rest_api | |
| ECR_REPOSITORY: lif/dev/lif_example_data_source_rest_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: example-data-source-api-build | |
| aws-region: ${{ env.AWS_REGION }} | |
| ecr-repository: ${{ env.ECR_REPOSITORY }} | |
| - name: Update the lif-example-data-source-rest-api ECS Service | |
| uses: ./.github/actions/update-cluster | |
| with: | |
| github-actions-role: ${{ env.GHA_ROLE }} | |
| role-session-name: example-data-source-api-ecs | |
| aws-region: ${{ env.AWS_REGION }} | |
| ecs-cluster: ${{ env.ECS_CLUSTER }} | |
| ecs-service: ${{ env.ECS_SERVICE }} | |