Skip to main content

Module input

Module input 

Source
Expand description

Typed access to action inputs.

An action input named foo-bar is passed to the process as the environment variable INPUT_FOO-BAR: the rule is INPUT_ + uppercased name with spaces replaced by underscores (hyphens are kept). This matches @actions/core’s getInput.

The name → key transform and the strict boolean parser are pure functions so they are unit-tested without mutating the global environment.

Structs§

InputOptions
Options controlling how an input is read.

Functions§

bool_input
Read a boolean input using the strict YAML 1.2 core schema (true|True|TRUE|false|False|FALSE).
input
Read an optional input, trimmed. Returns "" when unset.
input_as
Read an input and parse it via FromStr.
input_env_key
Compute the environment-variable key for an input name.
input_required
Read a required input, trimmed.
input_with
Read an input with explicit InputOptions.
mask_input
Mask the (untrimmed) raw value of input name in subsequent logs.
multiline_input
Split a multiline input on \n, dropping empty lines. Each retained line is trimmed.
multiline_input_with
Read a multiline input with explicit InputOptions. Empty raw lines are dropped before optional trimming, matching @actions/core.