File tree Expand file tree Collapse file tree 5 files changed +21
-4
lines changed Expand file tree Collapse file tree 5 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ inputs:
15
15
oidc-audience :
16
16
description : " By default, this is the URL of the GitHub repository owner, such as the organization that owns the repository."
17
17
required : false
18
+ oidc-only :
19
+ description : " Set to true to only authenticate using OIDC and not set up JFrog CLI."
20
+ default : " false"
21
+ required : false
18
22
disable-job-summary :
19
23
description : " Set to true to disable the generation of Job Summaries."
20
24
default : " false"
Original file line number Diff line number Diff line change @@ -40,8 +40,13 @@ function main() {
40
40
core . startGroup ( 'Setup JFrog CLI' ) ;
41
41
utils_1 . Utils . setCliEnv ( ) ;
42
42
let jfrogCredentials = yield utils_1 . Utils . getJfrogCredentials ( ) ;
43
- yield utils_1 . Utils . getAndAddCliToPath ( jfrogCredentials ) ;
44
- yield utils_1 . Utils . configJFrogServers ( jfrogCredentials ) ;
43
+ if ( core . getInput ( utils_1 . Utils . OIDC_ONLY ) !== 'true' ) {
44
+ yield utils_1 . Utils . getAndAddCliToPath ( jfrogCredentials ) ;
45
+ yield utils_1 . Utils . configJFrogServers ( jfrogCredentials ) ;
46
+ }
47
+ else {
48
+ core . debug ( 'Skipping JFrog CLI setup as oidc-only is enabled.' ) ;
49
+ }
45
50
}
46
51
catch ( error ) {
47
52
core . setFailed ( error . message ) ;
Original file line number Diff line number Diff line change @@ -929,6 +929,8 @@ Utils.CLI_REMOTE_ARG = 'download-repository';
929
929
Utils . OIDC_AUDIENCE_ARG = 'oidc-audience' ;
930
930
// OpenID Connect provider_name input
931
931
Utils . OIDC_INTEGRATION_PROVIDER_NAME = 'oidc-provider-name' ;
932
+ // Whether to skip JFrog CLI setup and only use OIDC
933
+ Utils . OIDC_ONLY = 'oidc-only' ;
932
934
// Application yaml root key
933
935
Utils . APPLICATION_ROOT_YML = 'application' ;
934
936
// Application Config file key, yaml should look like:
Original file line number Diff line number Diff line change @@ -6,8 +6,12 @@ async function main() {
6
6
core . startGroup ( 'Setup JFrog CLI' ) ;
7
7
Utils . setCliEnv ( ) ;
8
8
let jfrogCredentials : JfrogCredentials = await Utils . getJfrogCredentials ( ) ;
9
- await Utils . getAndAddCliToPath ( jfrogCredentials ) ;
10
- await Utils . configJFrogServers ( jfrogCredentials ) ;
9
+ if ( core . getInput ( Utils . OIDC_ONLY ) !== 'true' ) {
10
+ await Utils . getAndAddCliToPath ( jfrogCredentials ) ;
11
+ await Utils . configJFrogServers ( jfrogCredentials ) ;
12
+ } else {
13
+ core . debug ( 'Skipping JFrog CLI setup as oidc-only is enabled.' ) ;
14
+ }
11
15
} catch ( error ) {
12
16
core . setFailed ( ( < any > error ) . message ) ;
13
17
} finally {
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ export class Utils {
60
60
private static readonly OIDC_AUDIENCE_ARG : string = 'oidc-audience' ;
61
61
// OpenID Connect provider_name input
62
62
private static readonly OIDC_INTEGRATION_PROVIDER_NAME : string = 'oidc-provider-name' ;
63
+ // Whether to skip JFrog CLI setup and only use OIDC
64
+ public static readonly OIDC_ONLY : string = 'oidc-only' ;
63
65
// Application yaml root key
64
66
private static readonly APPLICATION_ROOT_YML : string = 'application' ;
65
67
// Application Config file key, yaml should look like:
You can’t perform that action at this time.
0 commit comments