Skip to content

Commit

Permalink
Merge pull request #2 from PaloAltoNetworks/fix-path-not-exists
Browse files Browse the repository at this point in the history
Fix path not exists
  • Loading branch information
yaron-cider authored Aug 19, 2024
2 parents 9078f6b + b3e7c08 commit b0e2f8d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ async function main(github, context, artifactName,artifactPath,retentionDays,com
}

async function uploadArtifact(artifactClient, artifactName, artifactPath,retentionDays,compressionLevel) {

if (!fs.existsSync(artifactPath)){
console.warn("No files were found with the provided path: /not. No artifacts will be uploaded.");
return
}

foundPath = hasGitFolderWithGitHubRunnerToken(artifactPath)
if (foundPath) {
throw new Error(`Found GITHUB_TOKEN in artifact, under path ${foundPath}`);
Expand Down

0 comments on commit b0e2f8d

Please sign in to comment.