1
0
mirror of https://github.com/actions/upload-artifact.git synced 2025-12-11 19:07:53 +01:00
This commit is contained in:
Josh Gross
2024-08-15 16:31:57 -04:00
parent cb6558bb10
commit acb59e4776
7 changed files with 13 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ export enum Inputs {
RetentionDays = 'retention-days',
CompressionLevel = 'compression-level',
Overwrite = 'overwrite',
IncludeHiddenFiles = 'include-hidden-files',
IncludeHiddenFiles = 'include-hidden-files'
}
export enum NoFileOptions {

View File

@@ -29,7 +29,7 @@ export function getInputs(): UploadInputs {
searchPath: path,
ifNoFilesFound: noFileBehavior,
overwrite: overwrite,
includeHiddenFiles: includeHiddenFiles,
includeHiddenFiles: includeHiddenFiles
} as UploadInputs
const retentionDaysStr = core.getInput(Inputs.RetentionDays)

View File

@@ -24,7 +24,10 @@ async function deleteArtifactIfExists(artifactName: string): Promise<void> {
export async function run(): Promise<void> {
const inputs = getInputs()
const searchResult = await findFilesToUpload(inputs.searchPath, inputs.includeHiddenFiles)
const searchResult = await findFilesToUpload(
inputs.searchPath,
inputs.includeHiddenFiles
)
if (searchResult.filesToUpload.length === 0) {
// No files were found, different use cases warrant different types of behavior if nothing is found
switch (inputs.ifNoFilesFound) {