Skip to content

api_function_importgithubactionsartifact

hugoalh edited this page Nov 12, 2023 · 10 revisions

Import-GitHubActionsArtifact

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

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

Import artifact that shared from the previous jobs in the current workflow run.

  • # >= v2.0.0; Parameter Set: Single (Default)
    Import-GitHubActionsArtifact
      [-Name] <String>
      [-Destination <String>]
      [-CreateSubDirectory]
  • # < v2.0.0; Parameter Set: Single (Default)
    Import-GitHubActionsArtifact
      [-Name] <String>
      [-CreateSubfolder]
      [-Destination <String>]
  • # Parameter Set: All
    Import-GitHubActionsArtifact
      [-Destination <String>]
      -All

Parameter

All

<Switch> Whether to import all of the artifacts that shared the data from the past jobs in the same workflow; Always create subfolders.

  • Parameter Set: All
  • Position: Named
  • Accept Pipeline Input By Property Name: False ❌

CreateSubDirectory

(>= v2.0.0) [Optional] <Switch> Whether to create a sub-directory with artifact name and put the data into there.

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

Destination

[Optional] <String> Absolute literal path of the destination of the artifact(s).

  • Parameter Set:
    • All
    • Single
  • Default Value:
    $Env:GITHUB_WORKSPACE
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”οΈ
  • Accept Wildcard Characters: False ❌
  • Alias:
    • Dest
    • Path
    • Target

Name

<String> Name of the artifact.

  • Parameter Set: Single
  • Position: 0
  • Accept Pipeline Input: True βœ”οΈ
  • Accept Pipeline Input By Property Name: True βœ”οΈ
  • Accept Wildcard Characters: False ❌

CreateSubfolder

πŸ‘Ž Deprecated: This is officially deprecated, maybe throw warning in the latest version, and maybe remove in the future version.

(< v2.0.0) [Optional] <Switch> Whether to create a subfolder with artifact name and put the data into there.

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

Output

  • All: <PSCustomObject[]> Metadata of the imported artifacts.
    • [*].Name: Name of the artifact.
    • [*].Path: Absolute path of the destination of the artifact.
  • Single: <PSCustomObject> Metadata of the imported artifact.
    • Name: Name of the artifact.
    • Path: Absolute path of the destination of the artifact.

Guide

API

Enum

Enum Flag

Function

Function Alias

Clone this wiki locally