Skip to content

api_function_exportgithubactionsartifact

hugoalh edited this page Jul 23, 2023 · 12 revisions

Export-GitHubActionsArtifact

πŸ”˜ NodeJS Wrapper: This dependents and requires NodeJS to invoke.

  • Type: Function
  • In Version: >= v0.5.0
  • Alias:
    • Save-GitHubActionsArtifact

Description

# Parameter Set: LiteralPath
Export-GitHubActionsArtifact
  [-Name] <String>
  -LiteralPath <String[]>
  [-RootDirectory <String>]
  [-ContinueOnError]
  [-RetentionDays <Int16>]

# Parameter Set: Path (Default)
Export-GitHubActionsArtifact
  [-Name] <String>
  [-Path] <String[]>
  [-RootDirectory <String>]
  [-ContinueOnError]
  [-RetentionDays <Int16>]

Export artifact to persist the data and/or share with the future jobs in the same workflow.

Parameter

ContinueOnError

[Optional] <Switch> Whether the export should continue in the event of files fail to export; If not set and issue is encountered, export will stop and queued files will not export, the partial artifact availables which include files up until the issue; If set and issue is encountered, the issue file will ignore and skip, and queued files will still export, the partial artifact availables which include everything but exclude issue files.

  • Parameter Set:
    • LiteralPath
    • Path
  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”
  • Alias:
    • ContinueOnIssue

LiteralPath

<String[]> Literal path of the files that need to export as artifact.

  • Parameter Set: LiteralPath
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”
  • Accept Wildcard Characters: False ❌
  • Alias:
    • LiteralFile
    • LiteralFiles
    • LiteralPaths
    • LP
    • PSPath
    • PSPaths

⚠ Important: Previously, this parameter did accept pipeline input, but often cause issues, avoid if possible.

Name

<String> Name of the artifact.

  • Parameter Set:
    • LiteralPath
    • Path
  • Position: 0
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”
  • Accept Wildcard Characters: False ❌

Path

<String[]> Path of the files that need to export as artifact.

  • Parameter Set: Path
  • Position: 1
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”
  • Accept Wildcard Characters: True βœ”
  • Alias:
    • File
    • Files
    • Paths

⚠ Important: Previously, this parameter did accept pipeline input, but often cause issues, avoid if possible.

RetentionDays

  • (>= v1.7.0) [Optional] <Int16> Retention days of the artifact, in range 1~364.
  • (v1.6.X) [Optional] <Int16> Retention time of the artifact, by days in range 1~364.
  • (< v1.6.0) [Optional] <Byte> Retention time of the artifact, by days in range 1~90.

β€’

  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”
  • Alias:
    • (>= v0.5.0) RetentionDay
    • (>= v0.5.0) RetentionTime

RootDirectory

(>= v1.7.0) [Optional] <String> Absolute literal path of the root directory of the files for control files structure.

  • Parameter Set:
    • LiteralPath
    • Path
  • Default Value:
    $Env:GITHUB_WORKSPACE
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”
  • Accept Wildcard Characters: False ❌
  • Alias:
    • (>= v0.5.0) BaseRoot
    • (>= v0.5.0) Root

Output

  • (>= v1.7.0) <PSCustomObject> Metadata of the exported artifact.
    • Name: <String> Name of the exported artifact.
    • Items: <String[]> Items of the exported artifact.
    • Size: <UInt> Size of the exported artifact.
    • FailedItems: <String[]> Failed items of the exported artifact.
  • (< v1.7.0) <PSCustomObject> Metadata of the exported artifact.
    • Name: <String> Name of the exported artifact.
    • Item / Items: <String[]> Items of the exported artifact.
    • Size / Sizes: <UInt> Sizes of the exported artifact.
    • FailedItem / FailedItems: <String[]> Failed items of the exported artifact.

Guide

API

Enum

Enum Flag

Function

Function Alias

Clone this wiki locally