mirror of
https://github.com/actions/upload-artifact.git
synced 2025-07-18 12:38:22 +02:00
Exclude hidden files by default
This commit is contained in:
parent
834a144ee9
commit
cb6558bb10
18 changed files with 169 additions and 36 deletions
|
@ -5,5 +5,6 @@ export enum Inputs {
|
|||
SeparateDirectories = 'separate-directories',
|
||||
RetentionDays = 'retention-days',
|
||||
CompressionLevel = 'compression-level',
|
||||
DeleteMerged = 'delete-merged'
|
||||
DeleteMerged = 'delete-merged',
|
||||
IncludeHiddenFiles = 'include-hidden-files',
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ export function getInputs(): MergeInputs {
|
|||
const pattern = core.getInput(Inputs.Pattern, {required: true})
|
||||
const separateDirectories = core.getBooleanInput(Inputs.SeparateDirectories)
|
||||
const deleteMerged = core.getBooleanInput(Inputs.DeleteMerged)
|
||||
const includeHiddenFiles = core.getBooleanInput(Inputs.IncludeHiddenFiles)
|
||||
|
||||
const inputs = {
|
||||
name,
|
||||
|
@ -17,7 +18,8 @@ export function getInputs(): MergeInputs {
|
|||
separateDirectories,
|
||||
deleteMerged,
|
||||
retentionDays: 0,
|
||||
compressionLevel: 6
|
||||
compressionLevel: 6,
|
||||
includeHiddenFiles,
|
||||
} as MergeInputs
|
||||
|
||||
const retentionDaysStr = core.getInput(Inputs.RetentionDays)
|
||||
|
|
|
@ -62,7 +62,7 @@ export async function run(): Promise<void> {
|
|||
options.compressionLevel = inputs.compressionLevel
|
||||
}
|
||||
|
||||
const searchResult = await findFilesToUpload(tmpDir)
|
||||
const searchResult = await findFilesToUpload(tmpDir, inputs.includeHiddenFiles)
|
||||
|
||||
await uploadArtifact(
|
||||
inputs.name,
|
||||
|
|
|
@ -30,4 +30,9 @@ export interface MergeInputs {
|
|||
* If false, the artifacts will be merged into the root of the destination.
|
||||
*/
|
||||
separateDirectories: boolean
|
||||
|
||||
/**
|
||||
* Whether or not to include hidden files in the artifact
|
||||
*/
|
||||
includeHiddenFiles: boolean
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue