File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,20 +41,20 @@ jobs:
41
41
// retrieve the ambient OIDC token
42
42
const oidc_request_token = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
43
43
const oidc_request_url = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;
44
- const resp = await fetch(`${oidc_request_url}&audience=testpypi`, {
44
+ const oidc_resp = await fetch(`${oidc_request_url}&audience=testpypi`, {
45
45
headers: {Authorization: `bearer ${oidc_request_token}`},
46
46
}
47
47
);
48
- const oidc_token = (await response .json()).value;
48
+ const oidc_token = (await oidc_resp .json()).value;
49
49
50
50
// exchange the OIDC token for an API token
51
- const resp = await fetch('https://pypi.org/_/oidc/github/mint-token', {
51
+ const mint_resp = await fetch('https://pypi.org/_/oidc/github/mint-token', {
52
52
method : ' post' ,
53
53
body : ' {"token": "oidc_token"}' ,
54
54
headers : {'Content-Type': 'application/json'},
55
55
}
56
56
);
57
- const api_token = (await response .json()).token;
57
+ const api_token = (await mint_resp .json()).token;
58
58
59
59
// mask the newly minted API token, so that we don't accidentally leak it
60
60
core.setSecret(api_token)
You can’t perform that action at this time.
0 commit comments