diff --git a/.github/workflows/deploy_staging.yml b/.github/workflows/deploy_staging.yml new file mode 100644 index 000000000..1f73e6570 --- /dev/null +++ b/.github/workflows/deploy_staging.yml @@ -0,0 +1,38 @@ +name: Deploy to staging + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - staging + +# NOTE: This is actually using our federated isomer-staging account +jobs: + deploy staging: + name: Deploy app to staging + uses: ./.github/workflows/aws_deploy.yml + # NOTE: deploy in `staging` env to set env specific secrets + environment: staging + with: + aws-region: "ap-southeast-1" + aws-account-id: 058264420411 + cicd-role: "arn:aws:iam::058264420411:role/isomer-next-infra-github-oidc-role-aaefdfd" + ecr-repository: "isomer-next-infra-stg-ecr" + ecs-cluster-name: "isomer-next-infra-ecs" + ecs-service-name: "isomer-next-infra-ecs-service" + ecs-container-name: "studio" + ecs-container-port: "3000" + environment: "staging" + shortEnv: "stg" + codedeploy-appspec-path: .aws/deploy/appspec.json + ecs-task-definition-path: ".aws/deploy/task-definition.json" + codedeploy-application-name: "isomer-next-infra-ecs-app" + codedeploy-deployment-group: "isomer-next-infra-ecs-dg" + path-to-dockerfile: "./apps/studio/Dockerfile" + + secrets: + DD_API_KEY: ${{ secrets.DD_API_KEY_GITHUB_ACTIONS }} + RDS_READER_ENDPOINT: ${{ secrets.RDS_READER_ENDPOINT }} diff --git a/.github/workflows/deploy_vapt.yml b/.github/workflows/deploy_vapt.yml index e54f837bb..7117032b3 100644 --- a/.github/workflows/deploy_vapt.yml +++ b/.github/workflows/deploy_vapt.yml @@ -1,4 +1,4 @@ -name: Deploy to staging +name: Deploy to vapt concurrency: group: ${{ github.ref }} @@ -15,22 +15,23 @@ jobs: name: Deploy app to vapt uses: ./.github/workflows/aws_deploy.yml # NOTE: deploy in `staging` env to set env specific secrets - environment: staging + # TODO: add this env in github actions + environment: vapt with: aws-region: "ap-southeast-1" aws-account-id: 058264420411 cicd-role: "arn:aws:iam::058264420411:role/isomer-next-infra-github-oidc-role-aaefdfd" - ecr-repository: "isomer-next-infra-stg-ecr" - ecs-cluster-name: "isomer-next-infra-ecs" - ecs-service-name: "isomer-next-infra-ecs-service" + ecr-repository: "isomer-next-infra-vapt-ecr" + ecs-cluster-name: "studio-vapt-ecs" + ecs-service-name: "studio-vapt-ecs-service" ecs-container-name: "studio" ecs-container-port: "3000" - environment: "staging" - shortEnv: "stg" + environment: "vapt" + shortEnv: "vapt" codedeploy-appspec-path: .aws/deploy/appspec.json ecs-task-definition-path: ".aws/deploy/task-definition.json" - codedeploy-application-name: "isomer-next-infra-ecs-app" - codedeploy-deployment-group: "isomer-next-infra-ecs-dg" + codedeploy-deployment-group: "studio-vapt-ecs-dg" + codedeploy-application-name: "studio-vapt-ecs-app" path-to-dockerfile: "./apps/studio/Dockerfile" secrets: