Skip to content

legacy_api_function_setgithubactionsenvironmentvariable

hugoalh edited this page Dec 27, 2023 · 2 revisions

Set-GitHubActionsEnvironmentVariable

πŸ‘Ž Deprecated

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

  • Type: Function
  • In Version: v0.5.0 ~ v1.7.X
  • Alias:
    • Set-GitHubActionsEnv
    • Set-GitHubActionsEnvironment

Set environment variable to the current step and/or all of the subsequent steps in the current job.

  • # Parameter Set: Single (Default)
    Set-GitHubActionsEnvironmentVariable
      [-Name] <String>
      [-Value] <String>
      [-NoToUpper]
      [-Scope <EnumFlag:GitHubActionsEnvironmentVariableScopes>]
  • # Parameter Set: Multiple
    Set-GitHubActionsEnvironmentVariable
      [-InputObject] <Hashtable>
      [-NoToUpper]
      [-Scope <EnumFlag:GitHubActionsEnvironmentVariableScopes>]

Parameter

InputObject

<Hashtable> Environment variables.

  • Parameter Set: Multiple
  • Position: 0
  • Accept Pipeline Input: True βœ”οΈ
  • Accept Pipeline Input By Property Name: False ❌
  • Alias:
    • Input
    • Object

Name

<String> Name of the environment variable.

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

NoToUpper

[Optional] <Switch> Whether to not format names of the environment variable to the upper case.

  • Position: Named
  • Accept Pipeline Input By Property Name: True βœ”οΈ
  • Alias:
    • NoToUpperCase

Scope

[Optional] <EnumFlag:GitHubActionsEnvironmentVariableScopes> Scope of the environment variable(s).

  • Default Value:
    [GitHubActionsEnvironmentVariableScopes]3
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: True βœ”οΈ
  • Accept Wildcard Characters: False ❌
  • Alias:
    • Scopes

Value

<String> Value of the environment variable.

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

Output

<Void>

Guide

API

Enum

Enum Flag

Function

Function Alias

Clone this wiki locally