-
Notifications
You must be signed in to change notification settings - Fork 21
39 lines (35 loc) · 1.01 KB
/
Copy pathdeploy-prod.yml
File metadata and controls
39 lines (35 loc) · 1.01 KB
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
name: Deploy to Prod
on:
workflow_dispatch:
release:
types:
- released
permissions:
contents: read # Needed to checkout repo
concurrency:
group: deploy-prod
cancel-in-progress: true
jobs:
check-ref:
name: Fail if not a tag
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
steps:
- run: |
echo "Failing intentionally. Only tags may be deployed to prod."
exit 1
call-workflow:
name: Call MBTA deploy-ecs workflow
if: ${{ startsWith(github.ref, 'refs/tags/') }}
permissions:
contents: read # Needed to checkout repo
id-token: write # Needed to access ECR and ECS
uses: mbta/workflows/.github/workflows/deploy-ecs.yml@c76e5ccd9556fbea52bc41548f7ceed5985ad775 # v5.1.0
with:
app-name: api
environment: prod
docker-additional-tags: prod
secrets:
aws-role-arn: ${{ secrets.AWS_ROLE_ARN }}
docker-repo: ${{ secrets.DOCKER_REPO }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}