Skip to content

Commit

Permalink
🩹 [Patch]: Enhance Set-GitHubOutput.ps1 to convert non-string values …
Browse files Browse the repository at this point in the history
…to JSON format
  • Loading branch information
MariusStorhaug committed Feb 24, 2025
1 parent df9161b commit 3d06aee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/functions/public/Commands/Set-GitHubOutput.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3d06aee

Please sign in to comment.