Skip to content

Commit 3114350

Browse files
committed
Create the OIDC Identity Provider for S3
1 parent 552326d commit 3114350

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ on:
2222
ORG_DEPLOY_TOKEN:
2323
description: 'GitHub token for deployment'
2424
required: true
25-
ORG_AWS_ACCESS_KEY_ID:
26-
description: 'AWS Access Key ID for S3 sync'
27-
required: false
28-
ORG_AWS_SECRET_ACCESS_KEY:
29-
description: 'AWS Secret Access Key for S3 sync'
30-
required: false
31-
ORG_AWS_SESSION_TOKEN:
32-
description: 'AWS Session Token for S3 sync (if using temporary credentials)'
33-
required: false
3425

3526
jobs:
3627
deploy-to-book-server:
@@ -302,6 +293,9 @@ jobs:
302293
303294
sync-media-to-s3:
304295
runs-on: ubuntu-latest
296+
permissions:
297+
id-token: write # Allows the workflow to get an OIDC token
298+
contents: read # Needed for checkout
305299
steps:
306300
- name: Checkout repository
307301
uses: actions/checkout@v4
@@ -316,9 +310,7 @@ jobs:
316310
- name: Configure AWS credentials
317311
uses: aws-actions/configure-aws-credentials@v4
318312
with:
319-
aws-access-key-id: ${{ secrets.ORG_AWS_ACCESS_KEY_ID }}
320-
aws-secret-access-key: ${{ secrets.ORG_AWS_SECRET_ACCESS_KEY }}
321-
aws-session-token: ${{ secrets.ORG_AWS_SESSION_TOKEN }}
313+
role-to-assume: arn:aws:iam::381492306053:role/GitHubActionsS3Access
322314
aws-region: ${{ steps.config.outputs.region }}
323315

324316
- name: Sync media to S3

0 commit comments

Comments
 (0)