Skip to content

Start-GitHubLogGroup

SYNOPSIS

Starts a log group in GitHub Actions

SYNTAX

__AllParameterSets

Start-GitHubLogGroup [-Name] <string> [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

Creates an expandable group in the GitHub Actions log. Anything you print to the log between the Start-GitHubLogGroup and Stop-GitHubLogGroup commands will be nested inside an expandable entry in the log. This is useful for organizing long log outputs and making them more readable.

This function only has an effect when running in a GitHub Actions workflow (when $env:GITHUB_ACTIONS is 'true'). When run outside of GitHub Actions, it does nothing.

This corresponds to the ::group::{title} workflow command in GitHub Actions.

EXAMPLES

EXAMPLE 1

Start-GitHubLogGroup 'MyGroup'

Starts a new log group named 'MyGroup'. All subsequent log output will be grouped under this expandable section until Stop-GitHubLogGroup is called.

EXAMPLE 2

Start-GitHubLogGroup 'Building application'
Write-Host 'Step 1: Restoring packages'
Write-Host 'Step 2: Compiling code'
Write-Host 'Step 3: Running tests'
Stop-GitHubLogGroup

Creates a collapsible log group containing the build steps. The output will appear nested under the "Building application" header in the GitHub Actions log.

PARAMETERS

-Name

The title of the log group. This will be displayed as the header of the expandable group in the GitHub Actions log.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Workflow commands