diff --git a/.github/workflows/deploy-dev-blue.yml b/.github/workflows/deploy-dev-blue.yml index 9274336d..10e04635 100644 --- a/.github/workflows/deploy-dev-blue.yml +++ b/.github/workflows/deploy-dev-blue.yml @@ -9,6 +9,9 @@ jobs: deploy: name: Deploy runs-on: ubuntu-latest + permissions: + id-token: write + contents: read environment: dev-blue concurrency: dev-blue if: github.repository_owner == 'mbta' @@ -18,16 +21,14 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: mbta/actions/build-push-ecr@v1 + - uses: mbta/actions/build-push-ecr@v2 id: build-push with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} docker-repo: ${{ secrets.DOCKER_REPO }} - - uses: mbta/actions/deploy-ecs@v1 + - uses: mbta/actions/deploy-ecs@v2 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} ecs-cluster: ${{ env.ECS_CLUSTER }} ecs-service: ${{ env.ECS_SERVICE }} docker-tag: ${{ steps.build-push.outputs.docker-tag }} diff --git a/.github/workflows/deploy-dev-green.yml b/.github/workflows/deploy-dev-green.yml index f003ba8f..1dbf8ea1 100644 --- a/.github/workflows/deploy-dev-green.yml +++ b/.github/workflows/deploy-dev-green.yml @@ -6,6 +6,9 @@ jobs: deploy: name: Deploy runs-on: ubuntu-latest + permissions: + id-token: write + contents: read environment: dev-green concurrency: dev-green env: @@ -14,16 +17,14 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: mbta/actions/build-push-ecr@v1 + - uses: mbta/actions/build-push-ecr@v2 id: build-push with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} docker-repo: ${{ secrets.DOCKER_REPO }} - - uses: mbta/actions/deploy-ecs@v1 + - uses: mbta/actions/deploy-ecs@v2 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} ecs-cluster: ${{ env.ECS_CLUSTER }} ecs-service: ${{ env.ECS_SERVICE }} docker-tag: ${{ steps.build-push.outputs.docker-tag }} diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 3fe537e3..603ce3c5 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -9,6 +9,9 @@ jobs: deploy: name: Deploy runs-on: ubuntu-latest + permissions: + id-token: write + contents: read environment: dev concurrency: dev env: @@ -17,16 +20,14 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: mbta/actions/build-push-ecr@v1 + - uses: mbta/actions/build-push-ecr@v2 id: build-push with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} docker-repo: ${{ secrets.DOCKER_REPO }} - - uses: mbta/actions/deploy-ecs@v1 + - uses: mbta/actions/deploy-ecs@v2 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} ecs-cluster: ${{ env.ECS_CLUSTER }} ecs-service: ${{ env.ECS_SERVICE }} docker-tag: ${{ steps.build-push.outputs.docker-tag }} diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 6f285f24..9eae7b60 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -6,6 +6,9 @@ jobs: deploy: name: Deploy runs-on: ubuntu-latest + permissions: + id-token: write + contents: read environment: prod concurrency: prod env: @@ -14,17 +17,15 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: mbta/actions/build-push-ecr@v1 + - uses: mbta/actions/build-push-ecr@v2 id: build-push with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} docker-repo: ${{ secrets.DOCKER_REPO }} - name: Deploy to ECS - uses: mbta/actions/deploy-ecs@v1 + uses: mbta/actions/deploy-ecs@v2 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} ecs-cluster: ${{ env.ECS_CLUSTER }} ecs-service: ${{ env.ECS_SERVICE }} docker-tag: ${{ steps.build-push.outputs.docker-tag }}