-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathWorkflowInitialize.ps1
More file actions
38 lines (31 loc) · 1.2 KB
/
Copy pathWorkflowInitialize.ps1
File metadata and controls
38 lines (31 loc) · 1.2 KB
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
35
36
37
38
Param(
[Parameter(HelpMessage = "The repository of the action", Mandatory = $false)]
[string] $actionsRepo,
[Parameter(HelpMessage = "The ref of the action", Mandatory = $false)]
[string] $actionsRef
)
. (Join-Path -Path $PSScriptRoot -ChildPath "..\AL-Go-Helper.ps1" -Resolve)
. (Join-Path -Path $PSScriptRoot -ChildPath "..\AL-Go-TestRepoHelper.ps1" -Resolve)
if ($actionsRepo -eq 'microsoft/AL-Go-Actions') {
Write-Host "Using AL-Go for GitHub $actionsRef"
$verstr = $actionsRef
}
elseif ($actionsRepo -eq 'microsoft/AL-Go') {
Write-Host "Using AL-Go for GitHub Preview ($actionsRef)"
$verstr = "p"
}
else {
Write-Host "Using direct AL-Go development ($($actionsRepo)@$actionsRef)"
$verstr = "d"
}
Write-Big -str "a$verstr"
# Test the AL-Go repository is set up correctly
TestALGoRepository
# Test the prerequisites for the test runner
TestRunnerPrerequisites
# Create a json object that contains an entry for the workflowstarttime
# Use ISO 8601 format for locale-agnostic serialization
$scopeJson = @{
"workflowStartTime" = [DateTime]::UtcNow.ToString("o")
} | ConvertTo-Json -Compress
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "telemetryScopeJson=$scopeJson"