Skip to content

api_function_testgithubactionsenvironment

hugoalh edited this page Mar 2, 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] [-StepSummary] [-ToolCache] [-Mandatory] [-MandatoryMessage <String>]

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

Parameter

Artifact

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

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

Cache

[Optional] <Switch> Also test whether has 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.

  • 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 has OpenID Connect (OIDC) resources.

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

StepSummary

[Optional] <Switch> Also test whether has step summary resources.

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

ToolCache

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

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

Output

  • (>= v1.1.0)
    • <Boolean> Test result when the requirement is not mandatory.
    • <Void> Nothing when the requirement is mandatory.
  • (< v1.1.0) <Boolean> Test result.

Guide

API

Enum

Enum Flag

Function

Function Alias

Clone this wiki locally