Push Monitor #3
Workflow file for this run
This file contains 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: Push Monitor | |
on: | |
workflow_dispatch: | |
jobs: | |
push: | |
name: push-monitor | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
outputs: | |
docker-tag: ${{ steps.ecr.outputs.docker-tag }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build, tag, and push image to Amazon ECR | |
id: ecr | |
uses: mbta/actions/build-push-ecr@v2 | |
with: | |
docker-repo: "${{ secrets.TID_AWS_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/dotcom-monitor" | |
dockerfile-path: "-f ./deploy/monitor/Dockerfile ." | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
deploy: | |
name: Deploy monitor to all environments | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
deploy-env: [dev-green, dev-blue, dev, prod] | |
needs: [push] | |
steps: | |
- uses: mbta/actions/deploy-ecs@v2 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
ecs-cluster: dotcom | |
ecs-service: dotcom-monitor-${{ matrix.deploy-env }} | |
docker-tag: needs.push.outputs.docker-tag |