Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
fix: switch to aws roles (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
inian authored Jan 17, 2023
1 parent 515d1d0 commit 8bb798a
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v3

Expand All @@ -54,26 +55,32 @@ jobs:
platforms: amd64,arm64
- uses: docker/setup-buildx-action@v2

- name: Login to ECR
uses: docker/login-action@v2
- name: configure aws credentials - staging
uses: aws-actions/configure-aws-credentials@v1
with:
registry: public.ecr.aws
username: ${{ secrets.PROD_ACCESS_KEY_ID }}
password: ${{ secrets.PROD_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
aws-region: "us-east-1"

- name: Login to ECR account - staging
uses: docker/login-action@v2
with:
registry: 436098097459.dkr.ecr.us-east-1.amazonaws.com
username: ${{ secrets.DEV_ACCESS_KEY_ID }}
password: ${{ secrets.DEV_SECRET_ACCESS_KEY }}

- name: configure aws credentials - prod
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
aws-region: "us-east-1"

- name: Login to ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws

- name: Login to ECR account - prod
uses: docker/login-action@v2
with:
registry: 646182064048.dkr.ecr.us-east-1.amazonaws.com
username: ${{ secrets.PROD_ACCESS_KEY_ID }}
password: ${{ secrets.PROD_SECRET_ACCESS_KEY }}

- name: Login to GHCR
uses: docker/login-action@v2
Expand Down

0 comments on commit 8bb798a

Please sign in to comment.