Skip to content

Commit

Permalink
move main action back to repo version, update action.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
krisrjohnson21 authored Oct 17, 2023
1 parent 3676d65 commit f569f0b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
22 changes: 8 additions & 14 deletions .github/actions/deploy/action.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Deploy To Environment
description: Build docker image and deploy it for each data pipeline.
inputs:
aws-access-key-id:
description: AWS_ACCESS_KEY_ID
required: true
aws-secret-access-key:
description: AWS_SECRET_ACCCESS_KEY
aws-role-arn:
description: AWS_ROLE_ARN
required: true
docker-repo:
description: ECR Docker repo to push to
Expand All @@ -20,26 +17,23 @@ inputs:
runs:
using: 'composite'
steps:
- uses: mbta/actions/build-push-ecr@v1
- uses: mbta/actions/build-push-ecr@v2
id: build-push
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
role-to-assume: ${{ inputs.aws-role-arn }}
docker-repo: ${{ inputs.docker-repo }}
dockerfile-path: ./python_src/
- uses: mbta/actions/deploy-ecs@v1
- uses: mbta/actions/deploy-ecs@v2
id: deploy-ingestion
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
role-to-assume: ${{ inputs.aws-role-arn }}
ecs-cluster: lamp
ecs-service: lamp-ingestion-${{ inputs.env-name }}
docker-tag: ${{ steps.build-push.outputs.docker-tag }}
- uses: mbta/actions/deploy-ecs@v1
- uses: mbta/actions/deploy-ecs@v2
id: deploy-performance-manager
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
role-to-assume: ${{ inputs.aws-role-arn }}
ecs-cluster: lamp
ecs-service: lamp-performance-manager-${{ inputs.env-name }}
docker-tag: ${{ steps.build-push.outputs.docker-tag }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v3
- uses: mbta/actions/deploy-ecs@v2
- uses: ./.github/actions/deploy
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
docker-repo: ${{ secrets.LAMP_DOCKER_URI }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v3
- uses: mbta/actions/deploy-ecs@v2
- uses: ./.github/actions/deploy
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
docker-repo: ${{ secrets.LAMP_DOCKER_URI }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v3
- uses: mbta/actions/deploy-ecs@v2
- uses: ./.github/actions/deploy
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
docker-repo: ${{ secrets.LAMP_DOCKER_URI }}
Expand Down

0 comments on commit f569f0b

Please sign in to comment.