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:
1515 oidc-audience :
1616 description : " By default, this is the URL of the GitHub repository owner, such as the organization that owns the repository."
1717 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
1822 disable-job-summary :
1923 description : " Set to true to disable the generation of Job Summaries."
2024 default : " false"
Original file line number Diff line number Diff line change @@ -40,8 +40,13 @@ function main() {
4040 core . startGroup ( 'Setup JFrog CLI' ) ;
4141 utils_1 . Utils . setCliEnv ( ) ;
4242 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+ }
4550 }
4651 catch ( error ) {
4752 core . setFailed ( error . message ) ;
Original file line number Diff line number Diff line change @@ -929,6 +929,8 @@ Utils.CLI_REMOTE_ARG = 'download-repository';
929929Utils . OIDC_AUDIENCE_ARG = 'oidc-audience' ;
930930// OpenID Connect provider_name input
931931Utils . OIDC_INTEGRATION_PROVIDER_NAME = 'oidc-provider-name' ;
932+ // Whether to skip JFrog CLI setup and only use OIDC
933+ Utils . OIDC_ONLY = 'oidc-only' ;
932934// Application yaml root key
933935Utils . APPLICATION_ROOT_YML = 'application' ;
934936// 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() {
66 core . startGroup ( 'Setup JFrog CLI' ) ;
77 Utils . setCliEnv ( ) ;
88 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+ }
1115 } catch ( error ) {
1216 core . setFailed ( ( < any > error ) . message ) ;
1317 } finally {
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ export class Utils {
6060 private static readonly OIDC_AUDIENCE_ARG : string = 'oidc-audience' ;
6161 // OpenID Connect provider_name input
6262 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' ;
6365 // Application yaml root key
6466 private static readonly APPLICATION_ROOT_YML : string = 'application' ;
6567 // Application Config file key, yaml should look like:
You can’t perform that action at this time.
0 commit comments