File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,13 @@ class Utils {
281281 }
282282 static configJFrogServers ( jfrogCredentials ) {
283283 return __awaiter ( this , void 0 , void 0 , function * ( ) {
284- let cliConfigCmd = [ 'config' ] ;
284+ let cliConfigCmd = [ ] ;
285+ let githubToken = jfrogCredentials . githubToken ;
286+ if ( ! ! githubToken ) {
287+ // Github Token
288+ cliConfigCmd = cliConfigCmd . concat ( '--github-token' , githubToken ) ;
289+ }
290+ cliConfigCmd = cliConfigCmd . concat ( 'config' ) ;
285291 for ( let configToken of Utils . getConfigTokens ( ) ) {
286292 // Mark the credentials as secrets to prevent them from being printed in the logs or exported to other workflows
287293 core . setSecret ( configToken ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export interface JfrogCredentials {
1313 oidcProviderName ?: string ;
1414 oidcTokenId ?: string ;
1515 oidcAudience : string ;
16+ githubToken ?: string ;
1617}
1718
1819/**
Original file line number Diff line number Diff line change @@ -317,7 +317,13 @@ export class Utils {
317317 }
318318
319319 public static async configJFrogServers ( jfrogCredentials : JfrogCredentials ) {
320- let cliConfigCmd : string [ ] = [ 'config' ] ;
320+ let cliConfigCmd : string [ ] = [ ] ;
321+ let githubToken : string | undefined = jfrogCredentials . githubToken ;
322+ if ( ! ! githubToken ) {
323+ // Github Token
324+ cliConfigCmd = cliConfigCmd . concat ( '--github-token' , githubToken ) ;
325+ }
326+ cliConfigCmd = cliConfigCmd . concat ( 'config' ) ;
321327 for ( let configToken of Utils . getConfigTokens ( ) ) {
322328 // Mark the credentials as secrets to prevent them from being printed in the logs or exported to other workflows
323329 core . setSecret ( configToken ) ;
You can’t perform that action at this time.
0 commit comments