Skip to content

Commit

Permalink
chore: change user based to role based
Browse files Browse the repository at this point in the history
  • Loading branch information
jbamlee committed Aug 29, 2024
1 parent 840c456 commit 5c31740
Showing 1 changed file with 30 additions and 15 deletions.
45 changes: 30 additions & 15 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
name: build terraswap-service image
runs-on: ubuntu-latest
environment: production
permissions:
id-token: write
contents: read
outputs:
phoenix-tag: ${{ steps.build-image.outputs.phoenix-tag }}
pisco-tag: ${{ steps.build-image.outputs.pisco-tag }}
Expand All @@ -43,10 +46,10 @@ jobs:
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1.7.0
uses: aws-actions/configure-aws-credentials@v3
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 }}
role-session-name: terraswap-service-build
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
Expand Down Expand Up @@ -84,12 +87,15 @@ jobs:
runs-on: ubuntu-latest
needs: build
environment: production
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1.7.0
uses: aws-actions/configure-aws-credentials@v3
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 }}
role-session-name: terraswap-service-deploy
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
Expand Down Expand Up @@ -123,12 +129,15 @@ jobs:
runs-on: ubuntu-latest
needs: build
environment: production
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1.7.0
uses: aws-actions/configure-aws-credentials@v3
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 }}
role-session-name: terraswap-service-deploy-pisco
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
Expand Down Expand Up @@ -162,12 +171,15 @@ jobs:
runs-on: ubuntu-latest
needs: build
environment: production
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1.7.0
uses: aws-actions/configure-aws-credentials@v3
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 }}
role-session-name: terraswap-service-deploy-columbus
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
Expand Down Expand Up @@ -201,12 +213,15 @@ jobs:
runs-on: ubuntu-latest
needs: build
environment: production
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1.7.0
uses: aws-actions/configure-aws-credentials@v3
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 }}
role-session-name: terraswap-service-deploy-columbus-v1
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
Expand Down

0 comments on commit 5c31740

Please sign in to comment.