Skip to content

Commit

Permalink
Assume role instead of using IAM keys directly
Browse files Browse the repository at this point in the history
  • Loading branch information
wdbasson committed Apr 23, 2023
1 parent 33f7397 commit e3582a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/aws_ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ concurrency:
jobs:
build:
name: Build image and push to ECR
permissions:
id-token: write # This is required for requesting the JWT
runs-on: ubuntu-latest

outputs:
Expand Down Expand Up @@ -85,9 +87,9 @@ jobs:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: af-south-1
role-to-assume: arn:aws:iam::402177810328:role/cicd
role-session-name: github-cicd

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down

0 comments on commit e3582a8

Please sign in to comment.