File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,17 @@ class Utils {
125
125
const exchangeUrl = jfrogCredentials . jfrogUrl . replace ( / \/ $ / , '' ) + '/access/api/v1/oidc/token' ;
126
126
core . debug ( 'Exchanging GitHub JSON web token with a JFrog access token...' ) ;
127
127
let projectKey = process . env . JF_PROJECT || '' ;
128
+ let jobId = process . env . GITHUB_JOB || '' ;
129
+ let runId = process . env . GITHUB_RUN_ID || '' ;
128
130
const httpClient = new http_client_1 . HttpClient ( ) ;
129
131
const data = `{
130
132
"grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
131
133
"subject_token_type": "urn:ietf:params:oauth:token-type:id_token",
132
134
"subject_token": "${ jsonWebToken } ",
133
135
"provider_name": "${ oidcProviderName } ",
134
- "project_key": "${ projectKey } "
136
+ "project_key": "${ projectKey } ",
137
+ "gh_job_id": "${ jobId } ",
138
+ "gh_run_id": "${ runId } ",
135
139
}` ;
136
140
const additionalHeaders = {
137
141
'Content-Type' : 'application/json' ,
Original file line number Diff line number Diff line change @@ -151,14 +151,18 @@ export class Utils {
151
151
core . debug ( 'Exchanging GitHub JSON web token with a JFrog access token...' ) ;
152
152
153
153
let projectKey : string = process . env . JF_PROJECT || '' ;
154
+ let jobId : string = process . env . GITHUB_JOB || '' ;
155
+ let runId : string = process . env . GITHUB_RUN_ID || '' ;
154
156
155
157
const httpClient : HttpClient = new HttpClient ( ) ;
156
158
const data : string = `{
157
159
"grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
158
160
"subject_token_type": "urn:ietf:params:oauth:token-type:id_token",
159
161
"subject_token": "${ jsonWebToken } ",
160
162
"provider_name": "${ oidcProviderName } ",
161
- "project_key": "${ projectKey } "
163
+ "project_key": "${ projectKey } ",
164
+ "gh_job_id": "${ jobId } ",
165
+ "gh_run_id": "${ runId } ",
162
166
}` ;
163
167
164
168
const additionalHeaders : OutgoingHttpHeaders = {
You can’t perform that action at this time.
0 commit comments