Skip to content

api_function_testgithubactionsenvironment

hugoalh edited this page Jul 23, 2023 · 11 revisions

Test-GitHubActionsEnvironment

⚠ Important: Do not confused with function Test-GitHubActionsNodeJsEnvironment!

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

Description

Test-GitHubActionsEnvironment
  [-Artifact]
  [-Cache]
  [-OpenIdConnect]
  [-ToolCache]
  [-Mandatory]
  [-MandatoryMessage <String>]

Test the current process whether is executing inside the GitHub Actions environment.

Parameter

Artifact

[Optional] <Switch> Also test whether have artifact resources.

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

Cache

[Optional] <Switch> Also test whether have cache resources.

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

Mandatory

[Optional] <Switch> Whether the requirement is mandatory; If mandatory but not fulfill, will throw an error (PowerShell error).

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

MandatoryMessage

[Optional] <String> Message when the requirement is mandatory but not fulfill.

  • Default Value:
    'This process requires to invoke inside the GitHub Actions environment!'
  • Position: Named
  • Accept Pipeline Input: False ❌
  • Accept Pipeline Input By Property Name: False ❌
  • Accept Wildcard Characters: False ❌
  • Alias:
    • RequiredMessage
    • RequireMessage

OpenIdConnect

[Optional] <Switch> Also test whether have OpenID Connect (OIDC) resources.

  • Position: Named
  • Accept Pipeline Input By Property Name: False ❌
  • Alias:
    • Oidc

ToolCache

[Optional] <Switch> Also test whether have tool cache resources.

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

StepSummary

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

(< v1.4.0) [Optional] <Switch> Also test whether have step summary resources.

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

Output

  • <Boolean> Test result when the requirement is not mandatory.
  • <Void> Nothing when the requirement is mandatory.

Guide

API

Enum

Enum Flag

Function

Function Alias

Clone this wiki locally