Push Monitor #28
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: | |
# UI provided by Github, values populated by repository | |
workflow_dispatch: | |
inputs: | |
deployment-env: | |
description: "Environment to deploy to" | |
required: true | |
type: environment | |
# Invoked via another workflow, value passed in by string | |
workflow_call: | |
inputs: | |
deployment-env: | |
description: "Environment to deploy to" | |
required: true | |
type: string | |
concurrency: | |
group: deploy-monitor-${{ inputs.deployment-env }} | |
cancel-in-progress: true | |
jobs: | |
push: | |
name: push-monitor | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
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 }} | |
- name: Deploy Monitor to ${{ inputs.deployment-env }} | |
uses: mbta/actions/deploy-ecs@v2 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
ecs-cluster: dotcom | |
ecs-service: dotcom-monitor-${{ inputs.deployment-env }} | |
docker-tag: ${{ steps.ecr.outputs.docker-tag }} |