Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a warning if user tries to upload over 10000 files #173

Merged
merged 2 commits into from
Feb 8, 2021
Merged
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
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