Skip to content

Commit 1fee158

Browse files
authored
build(s3-upload): use Amazon GHA to setup AWS CLI credentials (#466)
Use GitHub Action provided by the Amazon for AWS CLI credentials setup using role and OIDC.
1 parent b1a9f06 commit 1fee158

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ jobs:
3838
with:
3939
# This should be the same as the one specified for on.pull_request.branches
4040
ref: master
41+
- name: Setup AWS CLI credentials
42+
uses: aws-actions/configure-aws-credentials@v4
43+
with:
44+
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
45+
role-session-name: GitHubActionsSession
46+
aws-region: us-east-1
4147
- name: Checkout actions
4248
uses: actions/checkout@v4
4349
with:
@@ -49,9 +55,7 @@ jobs:
4955
uses: ./.github/.release/actions/actions/services/aws
5056
with:
5157
token: ${{ secrets.GH_TOKEN }}
52-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
53-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
54-
auth-method: access-key
58+
auth-method: role
5559
content-type: application/javascript
5660
content-encoding: gzip
5761
acl: public-read

0 commit comments

Comments
 (0)