-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(GHA): allow OIDC aws credentials (#2350)
- Loading branch information
Showing
6 changed files
with
57 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ env: | |
permissions: | ||
contents: write | ||
statuses: write | ||
id-token: write # This is required for requesting the JWT/OIDC | ||
|
||
jobs: | ||
build-deploy: | ||
|
@@ -48,9 +49,9 @@ jobs: | |
- uses: aws-actions/[email protected] | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-1 | ||
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole | ||
role-session-name: S2nQuicGHAS3Session | ||
aws-region: us-west-2 | ||
|
||
- name: Upload to S3 | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ env: | |
# should we taken before adding more permissions. | ||
permissions: | ||
statuses: write | ||
id-token: write # This is required for requesting the JWT/OIDC | ||
|
||
jobs: | ||
env: | ||
|
@@ -164,9 +165,9 @@ jobs: | |
- uses: aws-actions/[email protected] | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-1 | ||
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole | ||
role-session-name: S2nQuicGHAS3Session | ||
aws-region: us-west-2 | ||
|
||
- name: Upload to S3 | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
|
@@ -350,10 +351,10 @@ jobs: | |
with: | ||
report-script: ./scripts/compliance | ||
report-path: ./target/compliance/report.html | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole | ||
role-session-name: S2nQuicGHAS3Session | ||
aws-s3-region: us-west-2 | ||
aws-s3-bucket-name: s2n-quic-ci-artifacts | ||
aws-s3-region: us-west-1 | ||
cdn: $CDN | ||
|
||
coverage: | ||
|
@@ -385,9 +386,9 @@ jobs: | |
- uses: aws-actions/[email protected] | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-1 | ||
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole | ||
role-session-name: S2nQuicGHAS3Session | ||
aws-region: us-west-2 | ||
|
||
- name: Upload results | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
|
@@ -497,9 +498,9 @@ jobs: | |
- uses: aws-actions/[email protected] | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-1 | ||
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole | ||
role-session-name: S2nQuicGHAS3Session | ||
aws-region: us-west-2 | ||
|
||
- name: Upload to S3 | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
|
@@ -542,9 +543,9 @@ jobs: | |
- uses: aws-actions/[email protected] | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-1 | ||
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole | ||
role-session-name: S2nQuicGHAS3Session | ||
aws-region: us-west-2 | ||
|
||
- name: Upload to S3 | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
|
@@ -649,9 +650,10 @@ jobs: | |
- uses: aws-actions/[email protected] | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-1 | ||
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole | ||
role-session-name: S2nQuicGHAS3Session | ||
aws-region: us-west-2 | ||
|
||
|
||
- name: Upload to S3 | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
|
@@ -744,9 +746,9 @@ jobs: | |
- uses: aws-actions/[email protected] | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-1 | ||
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole | ||
role-session-name: S2nQuicGHAS3Session | ||
aws-region: us-west-2 | ||
|
||
- name: Upload to S3 | ||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,13 @@ on: | |
default: '3.7.1' | ||
type: string | ||
|
||
# Updating status is relatively safe (doesnt modify source code) and caution | ||
# should be taken before adding more permissions. | ||
permissions: | ||
statuses: write | ||
id-token: write # This is required for requesting the JWT/OIDC | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
@@ -48,9 +55,9 @@ jobs: | |
- uses: aws-actions/[email protected] | ||
if: github.event_name == 'schedule' || github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-1 | ||
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole | ||
role-session-name: S2nQuicGHAS3Session | ||
aws-region: us-west-2 | ||
|
||
- name: Upload to S3 | ||
if: github.event_name == 'schedule' || github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name | ||
|