File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 6
6
pull_request :
7
7
8
8
jobs :
9
+ debug :
10
+ permissions :
11
+ actions : read
12
+ id-token : write
13
+ contents : read
14
+ uses : bdehamer/workflows/.github/workflows/oidc-dump.yml@main
9
15
build :
10
16
runs-on : ubuntu-latest
17
+ permissions :
18
+ id-token : write
11
19
steps :
20
+ - run : |
21
+ echo "URL:${ACTIONS_ID_TOKEN_REQUEST_URL}"
22
+ echo "TOKEN:${ACTIONS_ID_TOKEN_REQUEST_TOKEN}"
23
+ curl "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=donottrust" \
24
+ -H "Authorization: bearer ${ACTIONS_ID_TOKEN_REQUEST_TOKEN}" \
25
+ -H "Accept: application/json; api-version=2.0" \
26
+ -H "Content-Type: application/json" \
27
+ --silent | jq -r '.value' > oidc_token
28
+ echo -e "\nOIDC Token (encoded)"
29
+ cat oidc_token
30
+ echo -e "\nOIDC Token (decoded)"
31
+ cat oidc_token | jq -R 'split(".") | .[0],.[1] | @base64d | fromjson'
12
32
- uses : actions/checkout@v3
13
33
- name : Use Node.js ${{ matrix.node-version }}
14
34
uses : actions/setup-node@v3
Original file line number Diff line number Diff line change 3
3
release :
4
4
types : [created]
5
5
jobs :
6
+ debug :
7
+ permissions :
8
+ actions : read
9
+ id-token : write
10
+ contents : read
11
+ uses : bdehamer/workflows/.github/workflows/oidc-dump.yml@main
6
12
build :
7
13
runs-on : ubuntu-latest
8
14
permissions :
You can’t perform that action at this time.
0 commit comments