Skip to content

Commit

Permalink
Merge pull request #173 from yacaovsnc/main
Browse files Browse the repository at this point in the history
Display a warning if user tries to upload over 10000 files
  • Loading branch information
yacaovsnc authored Feb 8, 2021
2 parents a1af2e8 + e95d1b9 commit ea3d524
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4078,6 +4078,9 @@ function run() {
const s = searchResult.filesToUpload.length === 1 ? '' : 's';
core.info(`With the provided path, there will be ${searchResult.filesToUpload.length} file${s} uploaded`);
core.debug(`Root artifact directory is ${searchResult.rootDirectory}`);
if (searchResult.filesToUpload.length > 10000) {
core.warning(`There are over 10,000 files in this artifact, consider create an archive before upload to improve the upload performance.`);
}
const artifactClient = artifact_1.create();
const options = {
continueOnError: false
Expand Down
6 changes: 6 additions & 0 deletions src/upload-artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ async function run(): Promise<void> {
)
core.debug(`Root artifact directory is ${searchResult.rootDirectory}`)

if (searchResult.filesToUpload.length > 10000) {
core.warning(
`There are over 10,000 files in this artifact, consider create an archive before upload to improve the upload performance.`
)
}

const artifactClient = create()
const options: UploadOptions = {
continueOnError: false
Expand Down

0 comments on commit ea3d524

Please sign in to comment.