-
Notifications
You must be signed in to change notification settings - Fork 11
55 lines (53 loc) · 1.77 KB
/
push-monitor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Push Monitor
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
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 Dev Blue
uses: mbta/actions/deploy-ecs@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
ecs-cluster: dotcom
ecs-service: dotcom-monitor-dev-blue
docker-tag: ${{ steps.ecr.outputs.docker-tag }}
- name: Deploy Monitor to Dev Green
uses: mbta/actions/deploy-ecs@v2
if: always()
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
ecs-cluster: dotcom
ecs-service: dotcom-monitor-dev-green
docker-tag: ${{ steps.ecr.outputs.docker-tag }}
- name: Deploy Monitor to Dev
uses: mbta/actions/deploy-ecs@v2
if: always()
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
ecs-cluster: dotcom
ecs-service: dotcom-monitor-dev
docker-tag: ${{ steps.ecr.outputs.docker-tag }}
- name: Deploy Monitor to Prod
uses: mbta/actions/deploy-ecs@v2
if: always()
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
ecs-cluster: dotcom
ecs-service: dotcom-monitor-prod
docker-tag: ${{ steps.ecr.outputs.docker-tag }}