Skip to content

api_function_exportgithubactionsartifact

hugoalh edited this page Nov 20, 2023 · 12 revisions

Export-GitHubActionsArtifact

πŸ‘€ Looking For Something Else: Looking for legacy Export-GitHubActionsArtifact? That is moved to here!

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

  • Type: Function
  • In Version: >= v2.0.0
  • Alias:
    • Save-GitHubActionsArtifact

Export artifact to share with all of the subsequent jobs in the current workflow run, and/or store it.

  • # Parameter Set: Path (Default)
    Export-GitHubActionsArtifact
      [-Name] <String>
      [-Path] <String[]>
      [-RootDirectory <String>]
      [-RetentionDays <Byte>]
      [-FailFast]
  • # Parameter Set: LiteralPath
    Export-GitHubActionsArtifact
      [-Name] <String>
      -LiteralPath <String[]>
      [-RootDirectory <String>]
      [-RetentionDays <Byte>]
      [-FailFast]

Parameter

FailFast

[Optional] <Switch> Whether to stop export artifact if any of file fail to export due to any of error.

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.

When enable, export will stop, include all of the queued files; The partial artifact will have files up until the failure.

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.

  • Parameter Set:
    • LiteralPath
    • Path
  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”οΈ

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

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: True βœ”οΈ
  • Accept Pipeline Input By Property Name: True βœ”οΈ
  • Accept Wildcard Characters: True βœ”οΈ
  • Alias:
    • File
    • Files
    • Paths

RetentionDays

[Optional] <Byte> Retention days of the artifact, override the default value.

  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”οΈ
  • Alias:
    • RetentionDay
    • RetentionTime

RootDirectory

[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:
    • BaseRoot
    • Root

Output

<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.

Guide

API

Enum

Enum Flag

Function

Function Alias

Clone this wiki locally