do not merge

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche 2025-09-30 09:22:54 -07:00
parent 4d2170c13e
commit bd15cda2b5
No known key found for this signature in database
GPG Key ID: 275988FAE5821713

34
.github/workflows/docs_test_oidc.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Dump OIDC sub claim
on:
push:
branches:
- main
- 'release/**' # run this on release branches too
pull_request:
branches:
- '**'
workflow_dispatch: # allow manual trigger
jobs:
show-oidc-claim:
runs-on: ubuntu-latest
permissions:
id-token: write # needed to fetch the OIDC token
contents: read
steps:
- name: Dump OIDC sub claim
run: |
url="${ACTIONS_ID_TOKEN_REQUEST_URL}?audience=sts.amazonaws.com"
jwt="$(curl -s -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$url" | jq -r .value)"
body="$(echo "$jwt" | cut -d. -f2 | tr '_-' '/+' | base64 -d 2>/dev/null || true)"
echo "OIDC sub: $(echo "$body" | jq -r .sub)"
- name: Configure AWS from OIDC
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-west-2
- name: Sanity check AWS credentials
run: aws sts get-caller-identity