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 @@ -742,6 +742,8 @@ Utils.CLI_REMOTE_ARG = 'download-repository';
742742Utils . OIDC_AUDIENCE_ARG = 'oidc-audience' ;
743743// OpenID Connect provider_name input
744744Utils . OIDC_INTEGRATION_PROVIDER_NAME = 'oidc-provider-name' ;
745+ // Whether to skip JFrog CLI setup and only use OIDC
746+ Utils . OIDC_ONLY = 'oidc-only' ;
745747// Disable Job Summaries feature flag
746748Utils . JOB_SUMMARY_DISABLE = 'disable-job-summary' ;
747749// Disable auto build info publish feature flag
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 @@ -57,6 +57,8 @@ export class Utils {
5757 private static readonly OIDC_AUDIENCE_ARG : string = 'oidc-audience' ;
5858 // OpenID Connect provider_name input
5959 private static readonly OIDC_INTEGRATION_PROVIDER_NAME : string = 'oidc-provider-name' ;
60+ // Whether to skip JFrog CLI setup and only use OIDC
61+ public static readonly OIDC_ONLY : string = 'oidc-only' ;
6062 // Disable Job Summaries feature flag
6163 public static readonly JOB_SUMMARY_DISABLE : string = 'disable-job-summary' ;
6264 // Disable auto build info publish feature flag
You can’t perform that action at this time.
0 commit comments