-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (36 loc) · 1.25 KB
/
deploy-ecs.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
name: Deploy to ECS
on:
workflow_dispatch:
inputs:
environment:
type: environment
required: true
default: dev
push:
branches: ["master"]
jobs:
call-workflow:
uses: mbta/workflows/.github/workflows/deploy-ecs.yml@main
with:
app-name: screens
environment: ${{ github.event.inputs.environment || 'dev' }}
secrets:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
docker-repo: ${{ secrets.DOCKER_REPO }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
refresh:
needs: call-workflow
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Create LAST_DEPLOY and upload to S3
run: |
touch LAST_DEPLOY
echo "This file's modified date is used by Screens app to determine when the last successful deploy happened" > LAST_DEPLOY
aws s3 cp LAST_DEPLOY s3://mbta-screens/screens-${{ github.event.inputs.environment || 'dev' }}/