Skip to content

GithubActionOutput

github-actions edited this page Apr 22, 2026 · 1 revision

Emits GitHub Actions workflow commands through the console output stream.

The helper becomes a no-op outside GitHub Actions, which lets callers route annotations and log groups through a single API without branching on the environment first.


  • Full name: \FastForward\DevTools\Console\Output\GithubActionOutput
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

__construct

public __construct(\Symfony\Component\Console\Output\ConsoleOutputInterface $output): mixed

Parameters:

Parameter Type Description
$output \Symfony\Component\Console\Output\ConsoleOutputInterface the console output used to emit workflow commands

__destruct

Closes any open group before the output instance is destroyed.

public __destruct(): mixed

error

Emits an error annotation for the current workflow step.

public error(string $message, string|null $file = null, int|null $line = null, int|null $column = null): void

Parameters:

Parameter Type Description
$message string the annotation message
$file string|null the related file when known
$line int|null the related line when known
$column int|null the related column when known

warning

Emits a warning annotation for the current workflow step.

public warning(string $message, string|null $file = null, int|null $line = null, int|null $column = null): void

Parameters:

Parameter Type Description
$message string the annotation message
$file string|null the related file when known
$line int|null the related line when known
$column int|null the related column when known

notice

Emits a notice annotation for the current workflow step.

public notice(string $message, string|null $file = null, int|null $line = null, int|null $column = null): void

Parameters:

Parameter Type Description
$message string the annotation message
$file string|null the related file when known
$line int|null the related line when known
$column int|null the related column when known

debug

Emits a debug workflow command.

public debug(string $message): void

Parameters:

Parameter Type Description
$message string the debug message

startGroup

Starts a collapsible GitHub Actions log group.

public startGroup(string $title): void

Parameters:

Parameter Type Description
$title string the group title

endGroup

Ends the current collapsible log group.

public endGroup(): void

group

Runs a callback wrapped inside a GitHub Actions log group.

public group(string $title, callable $callback): \FastForward\DevTools\Console\Output\TResult

Parameters:

Parameter Type Description
$title string the group title
$callback callable the callback to execute within the group

Clone this wiki locally