Skip to content

api_function_getgithubactionsinput

hugoalh edited this page Dec 27, 2023 · 7 revisions

Get-GitHubActionsInput

  • Type: Function
  • In Version: >= v0.3.0

Get input.

  • # Parameter Set: One (Default)
    Get-GitHubActionsInput
      [-Name] <String>
      [-Mandatory]
      [-MandatoryMessage <String>]
      [-Trim]
  • # Parameter Set: All
    Get-GitHubActionsInput
      -All
      [-Trim]
  • # Parameter Set: Prefix
    Get-GitHubActionsInput
      -NamePrefix <String>
      [-Trim]
  • # Parameter Set: Suffix
    Get-GitHubActionsInput
      -NameSuffix <String>
      [-Trim]

Parameter

All

<Switch> Whether to get all of the inputs.

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

Mandatory

[Optional] <Switch> Whether the input is mandatory; If mandatory but not exist, will throw an error.

  • Parameter Set: One
  • Position: Named
  • Accept Pipeline Input By Property Name: False ❌
  • Alias:
    • Require
    • Required

MandatoryMessage

[Optional] <String> Message when the input is mandatory but not exist; Placeholder {0} will represent current input name.

  • Parameter Set: One
  • Default Value:
    'Input `{0}` is not defined!'
    #=> Input `foo_bar` is not defined!
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: False ❌
  • Accept Wildcard Characters: False ❌
  • Alias:
    • RequiredMessage
    • RequireMessage

Name

<String> Name of the input.

  • Parameter Set: One
  • Position: 0
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: False ❌
  • Accept Wildcard Characters: False ❌
  • Alias:
    • Key

NamePrefix

<String> Name of the inputs start with.

  • Parameter Set: Prefix
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: False ❌
  • Accept Wildcard Characters: False ❌
  • Alias:
    • KeyPrefix
    • KeyStartWith
    • NameStartWith
    • Prefix
    • PrefixKey
    • PrefixName
    • StartWith
    • StartWithKey
    • StartWithName

NameSuffix

<String> Name of the inputs end with.

  • Parameter Set: Suffix
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: False ❌
  • Accept Wildcard Characters: False ❌
  • Alias:
    • EndWith
    • EndWithKey
    • EndWithName
    • KeyEndWith
    • KeySuffix
    • NameEndWith
    • Suffix
    • SuffixKey
    • SuffixName

Trim

[Optional] <Switch> Whether to trim the value of the input(s).

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

EmptyStringAsNull

πŸ‘Ž 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 assume empty string value of the input(s) as $Null.

  • Parameter Set:
    • All
    • One
    • Prefix
    • Suffix
  • Position: Named
  • Accept Pipeline Input By Property Name: False ❌
  • Alias:
    • AssumeEmptyStringAsNull

Output

  • All: <Hashtable> Inputs.
  • One: <String> Value of the input.
  • Prefix: <Hashtable> Inputs.
  • Suffix: <Hashtable> Inputs.

Guide

API

Enum

Enum Flag

Function

Function Alias

Clone this wiki locally