-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathentrypoint.ps1
34 lines (28 loc) · 951 Bytes
/
entrypoint.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function Main()
{
[OutputType([Void])]
param ([string[]] $inputArgs)
Write-Output "::group::Input arguments"
Write-Output $inputArgs
Write-Output "::endgroup::"
$output = dotnet '/app/GitHubIssuesParserCli.dll' $inputArgs
if ($LASTEXITCODE -ne 0 )
{
Write-Output "::error::GitHub issue form parser didn't complete successfully. See the step's log for more details."
exit $LASTEXITCODE
}
$random = Get-Random
$delimiter = "EOF_$random"
Write-Output "parsed-issue<<$delimiter" >> $env:GITHUB_OUTPUT
Write-Output $output >> $env:GITHUB_OUTPUT
Write-Output $delimiter >> $env:GITHUB_OUTPUT
Write-Output "::group::GitHub issue form parser output"
Write-Output $output
Write-Output "::endgroup::"
Write-Output "::group::GitHub issue form parser output indented"
$outputAsJson = ConvertFrom-Json $output
COnvertTo-Json $outputAsJson
Write-Output "::endgroup::"
}
# invoke entrypoint function
Main $args