Skip to content

chore: enable multi region support. #47

chore: enable multi region support.

chore: enable multi region support. #47

Workflow file for this run

name: Dev Deploy
on:
push:
branches:
- dev
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
deploy_release:
strategy:
matrix:
region: ["us-east-1", "us-west-1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ matrix.region }}
role-to-assume: arn:aws:iam::417712557820:role/GithubDeployRole
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build, tag, and push docker image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: source-data-proxy
IMAGE_TAG: ${{ github.sha }}
run: |
docker buildx build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG --push .
- name: Render Amazon ECS task definition
id: render-data-proxy-container
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition-family: source-data-proxy
container-name: source-data-proxy
image: ${{ steps.login-ecr.outputs.registry }}/source-data-proxy:${{ github.sha }}
- name: Deploy to Amazon ECS service
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: ${{ steps.render-data-proxy-container.outputs.task-definition }}
service: source-data-proxy
cluster: SourceCooperative-Dev