diff --git a/src/functions/public/Commands/Set-GitHubOutput.ps1 b/src/functions/public/Commands/Set-GitHubOutput.ps1 index 47bac71b..f2a4b5f4 100644 --- a/src/functions/public/Commands/Set-GitHubOutput.ps1 +++ b/src/functions/public/Commands/Set-GitHubOutput.ps1 @@ -60,6 +60,10 @@ default {} } + if ($Value -isnot [string]) { + $Value = $Value | ConvertTo-Json -Compress -Depth 100 + } + Write-Verbose "Output: [$Name] = [$Value]" # If the script is running in a GitHub composite action, accumulate the output under the 'result' key,