Skip to content

api_function_importgithubactionsartifact

hugoalh edited this page Dec 27, 2023 · 10 revisions

Import-GitHubActionsArtifact

πŸ‘€ Looking For Something Else

Looking for legacy Import-GitHubActionsArtifact? That is moved to here!

πŸ”˜ NodeJS Wrapper

This dependents and requires NodeJS to invoke.

πŸ”¬ Partial Implementation

This implementation is partial, for more information, please visit https://github.com/hugoalh-studio/ghactions-toolkit-powershell/issues/177.

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

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

  • # Parameter Set: SingleId (Default, >= v2.1.0)
    Import-GitHubActionsArtifact
      [-Id] <UInt64>
      [-Destination <String>]
  • # Parameter Set: SingleName (Default, < v2.1.0)
    Import-GitHubActionsArtifact
      [-Name] <String>
      [-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 ❌

Destination

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

  • Parameter Set:
    • All
    • SingleId
    • SingleName
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”οΈ
  • Accept Wildcard Characters: False ❌
  • Alias:
    • Dest
    • Path
    • Target

Id

(>= v2.1.0) <UInt64> ID of the artifact.

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

Name

<String> Name of the artifact.

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

CreateSubDirectory

πŸ‘Ž Deprecated

This is officially deprecated, maybe throw warning in the latest version, and maybe remove in the future version.

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

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

Output

  • All: <PSCustomObject[]> Metadata of the imported artifacts.
    • (< v2.1.0) [*].Name: <String> Name of the artifact.
    • [*].Path: <String> Absolute path of the destination of the artifact.
  • SingleId: <PSCustomObject> Metadata of the imported artifact.
    • Path: <String> Absolute path of the destination of the artifact.
  • SingleName: <PSCustomObject> Metadata of the imported artifact.
    • (< v2.1.0) Name: <String> Name of the artifact.
    • Path: <String> Absolute path of the destination of the artifact.

Guide

API

Enum

Enum Flag

Function

Function Alias

Clone this wiki locally