You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hugoalh.GitHubActionsToolkit/module/artifact.psm1
+79-25Lines changed: 79 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -15,16 +15,17 @@ Path of the files that need to export as artifact.
15
15
Literal path of the files that need to export as artifact.
16
16
.PARAMETERRootDirectory
17
17
Absolute literal path of the root directory of the files for control files structure.
18
-
.PARAMETERRetentionDays
19
-
Retention days of the artifact, override the default value.
20
-
.PARAMETERFailFast
21
-
Whether to stop export artifact if any of file fail to export due to any of error.
22
-
23
-
By default, the failed files will skip and ignore, and all of the queued files will still export; The partial artifact will have all of the files except the failed files.
18
+
.PARAMETERCompressionLevel
19
+
Level of compression for Zlib to be applied to the artifact archive. The value can range from 0 to 9.
24
20
25
-
When enable, export will stop, include all of the queued files; The partial artifact will have files up until the failure.
21
+
- 0: No compression
22
+
- 1: Best speed
23
+
- 6: Default compression (same as GNU Gzip)
24
+
- 9: Best compression
26
25
27
-
A partial artifact will always associate and available at the end, and the size reported will be the amount of storage that the organization or user will charge for this partial artifact.
26
+
Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
27
+
.PARAMETERRetentionDays
28
+
Retention days of the artifact, override the default value.
28
29
.OUTPUTS
29
30
[PSCustomObject] Metadata of the exported artifact.
30
31
#>
@@ -36,8 +37,9 @@ Function Export-Artifact {
36
37
[Parameter(Mandatory=$True,ParameterSetName='Path',Position=1,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)][SupportsWildcards()][ValidatePattern('^.+$', ErrorMessage ='Value is not a single line string!')][Alias('File','Files','Paths')][String[]]$Path,
37
38
[Parameter(Mandatory=$True,ParameterSetName='LiteralPath',ValueFromPipelineByPropertyName=$True)][ValidatePattern('^.+$', ErrorMessage ='Value is not a single line string!')][Alias('LiteralFile','LiteralFiles','LiteralPaths','LP','PSPath','PSPaths')][String[]]$LiteralPath,
[Parameter(ValueFromPipelineByPropertyName=$True)][ValidateRange(0,9, ErrorMessage ='Value is not a valid compression level!')][Int16]$CompressionLevel=-1,
[Parameter(Mandatory=$True,ParameterSetName='Single',Position=0,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)][ValidatePattern('^.+$', ErrorMessage ='Value is not a single line string!')][String]$Name,
[Parameter(Mandatory=$True,ParameterSetName='Single',Position=0,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)][ValidatePattern('^.+$', ErrorMessage ='Value is not a single line string!')][String]$Name,
[Parameter(Mandatory=$True,ParameterSetName='SingleName',Position=0,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)][ValidatePattern('^.+$', ErrorMessage ='Value is not a single line string!')][String]$Name,
110
155
[Parameter(ValueFromPipelineByPropertyName=$True)][ValidatePattern('^.+$', ErrorMessage ='Value is not a single line string!')][Alias('Dest','Path','Target')][String]$Destination,
0 commit comments