Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
os: ${{ github.actor == 'dependabot[bot]' && fromJSON('["ubuntu-latest"]') || fromJSON('["ubuntu-latest", "macos-13", "windows-latest"]') }}
os: ${{ github.actor == 'dependabot[bot]' && fromJSON('["ubuntu-latest"]') || fromJSON('["ubuntu-latest", "macos-15", "windows-latest"]') }}
cli-version: [ "", "latest", "1.46.4" ]
fail-fast: false
steps:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: "step-security"
inputs:
version:
description: "JFrog CLI Version"
default: "2.81.0"
default: "2.88.0"
required: false
download-repository:
description: "Remote repository in Artifactory pointing to 'https://releases.jfrog.io/artifactory/jfrog-cli'. Use this parameter in case you don't have an Internet access."
Expand Down
1 change: 1 addition & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ class Utils {
}
Utils.exportVariableIfNotSet('JFROG_CLI_ENV_EXCLUDE', '*password*;*secret*;*key*;*token*;*auth*;JF_ARTIFACTORY_*;JF_ENV_*;JF_URL;JF_USER;JF_PASSWORD;JF_ACCESS_TOKEN');
Utils.exportVariableIfNotSet('JFROG_CLI_OFFER_CONFIG', 'false');
Utils.exportVariableIfNotSet('JFROG_CLI_AVOID_NEW_VERSION_WARNING', 'true');
Utils.exportVariableIfNotSet('CI', 'true');
Utils.exportVariableIfNotSet('JFROG_CLI_SOURCECODE_REPOSITORY', (_a = process.env.GITHUB_REPOSITORY) !== null && _a !== void 0 ? _a : '');
Utils.exportVariableIfNotSet('JFROG_CLI_CI_JOB_ID', (_b = process.env.GITHUB_WORKFLOW) !== null && _b !== void 0 ? _b : '');
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion dist/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ function collectAndPublishBuildInfoIfNeeded() {
// We allow this step to fail, and we don't want to fail the entire build publish if they do.
try {
core.startGroup('Collect the Git information');
yield utils_1.Utils.runCli(['rt', 'build-add-git'], { cwd: workingDirectory });
const gitDir = (__nccwpck_require__(6928).join)(workingDirectory, '.git');
if ((__nccwpck_require__(9896).existsSync)(gitDir)) {
yield utils_1.Utils.runCli(['rt', 'build-add-git'], { cwd: workingDirectory });
}
else {
core.info('No .git directory found. Skipping Git information collection.');
}
}
catch (error) {
core.warning('Failed while attempting to collect Git information: ' + error);
Expand Down Expand Up @@ -1410,6 +1416,7 @@ class Utils {
}
Utils.exportVariableIfNotSet('JFROG_CLI_ENV_EXCLUDE', '*password*;*secret*;*key*;*token*;*auth*;JF_ARTIFACTORY_*;JF_ENV_*;JF_URL;JF_USER;JF_PASSWORD;JF_ACCESS_TOKEN');
Utils.exportVariableIfNotSet('JFROG_CLI_OFFER_CONFIG', 'false');
Utils.exportVariableIfNotSet('JFROG_CLI_AVOID_NEW_VERSION_WARNING', 'true');
Utils.exportVariableIfNotSet('CI', 'true');
Utils.exportVariableIfNotSet('JFROG_CLI_SOURCECODE_REPOSITORY', (_a = process.env.GITHUB_REPOSITORY) !== null && _a !== void 0 ? _a : '');
Utils.exportVariableIfNotSet('JFROG_CLI_CI_JOB_ID', (_b = process.env.GITHUB_WORKFLOW) !== null && _b !== void 0 ? _b : '');
Expand Down
2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ async function collectAndPublishBuildInfoIfNeeded() {
// We allow this step to fail, and we don't want to fail the entire build publish if they do.
try {
core.startGroup('Collect the Git information');
await Utils.runCli(['rt', 'build-add-git'], { cwd: workingDirectory });
const gitDir: string = require('path').join(workingDirectory, '.git');
if (require('fs').existsSync(gitDir)) {
await Utils.runCli(['rt', 'build-add-git'], { cwd: workingDirectory });
} else {
core.info('No .git directory found. Skipping Git information collection.');
}
} catch (error) {
core.warning('Failed while attempting to collect Git information: ' + error);
} finally {
Expand Down
5 changes: 3 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ export class Utils {
'*password*;*secret*;*key*;*token*;*auth*;JF_ARTIFACTORY_*;JF_ENV_*;JF_URL;JF_USER;JF_PASSWORD;JF_ACCESS_TOKEN',
);
Utils.exportVariableIfNotSet('JFROG_CLI_OFFER_CONFIG', 'false');
Utils.exportVariableIfNotSet('JFROG_CLI_AVOID_NEW_VERSION_WARNING', 'true');
Utils.exportVariableIfNotSet('CI', 'true');
Utils.exportVariableIfNotSet('JFROG_CLI_SOURCECODE_REPOSITORY', process.env.GITHUB_REPOSITORY ?? '');
Utils.exportVariableIfNotSet('JFROG_CLI_CI_JOB_ID', process.env.GITHUB_WORKFLOW ?? '');
Expand Down Expand Up @@ -479,8 +480,8 @@ export class Utils {
if (!jfrogCredentials.jfrogUrl) {
throw new Error(
`'download-repository' input provided, but no JFrog environment details found. ` +
`Hint - Ensure that the JFrog connection details environment variables are set: ` +
`either a Config Token with a JF_ENV_ prefix or separate env config (JF_URL, JF_USER, JF_PASSWORD, JF_ACCESS_TOKEN)`,
`Hint - Ensure that the JFrog connection details environment variables are set: ` +
`either a Config Token with a JF_ENV_ prefix or separate env config (JF_URL, JF_USER, JF_PASSWORD, JF_ACCESS_TOKEN)`,
);
}
serverObj.artifactoryUrl = jfrogCredentials.jfrogUrl.replace(/\/$/, '') + '/artifactory';
Expand Down
Loading