Skip to content

api_function_setgithubactionsenvironmentvariable

hugoalh edited this page Dec 27, 2023 · 9 revisions

Set-GitHubActionsEnvironmentVariable

πŸ‘€ Looking For Something Else

Looking for legacy Set-GitHubActionsEnvironmentVariable? That is moved to here!

  • Type: Function
  • In Version: >= v2.0.0
  • Alias:
    • Set-GitHubActionsEnv

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

  • Set-GitHubActionsEnvironmentVariable
      [-Name] <String>
      [-Value] <String>
      [-NoToUpper]
      [-Scope <EnumFlag:GitHubActionsEnvironmentVariableScopes>]
      [-Optimize]

Parameter

Name

<String> Name of the environment variable.

  • 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

Optimize

[Optional] Whether to have an optimize operation by replace exist command instead of add command directly.

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

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.

  • 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