Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e1322a96e | ||
|
|
a3ba0f5826 | ||
|
|
b9a5738c71 | ||
|
|
bac9381d43 |
@@ -1,7 +1,7 @@
|
|||||||
name: Get Go versions
|
name: Get Go versions
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0,12 * * *'
|
- cron: '0 3,15 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -10,4 +10,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tool-name: "Go"
|
tool-name: "Go"
|
||||||
image-url: "https://go.dev/images/gopher-footer.jpg"
|
image-url: "https://go.dev/images/gopher-footer.jpg"
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
@@ -66,7 +66,7 @@ class GoBuilder {
|
|||||||
|
|
||||||
$filename = "$goVersion.$goPlatform-$arch.$ArchiveType"
|
$filename = "$goVersion.$goPlatform-$arch.$ArchiveType"
|
||||||
|
|
||||||
return "https://go.dev/dl/$filename"
|
return "https://storage.googleapis.com/golang/$filename"
|
||||||
}
|
}
|
||||||
|
|
||||||
[string] Download() {
|
[string] Download() {
|
||||||
|
|||||||
+7
-18
@@ -8,26 +8,15 @@ Describe "Go" {
|
|||||||
$sourceLocation = Get-Location
|
$sourceLocation = Get-Location
|
||||||
|
|
||||||
function Get-UseGoLogs {
|
function Get-UseGoLogs {
|
||||||
$runnerProc = Get-Process -Name "Runner.Listener" -ErrorAction SilentlyContinue | Select-Object -First 1
|
# GitHub Windows images don't have `HOME` variable
|
||||||
#Write-Host "`$runnerProc: $($runnerProc | Out-String)"
|
$homeDir = $env:HOME ?? $env:HOMEDRIVE
|
||||||
if (-not $runnerProc -or -not $runnerProc.Path) {
|
$possiblePaths = @(
|
||||||
Write-Error "Runner.Listener process not found."
|
Join-Path -Path $homeDir -ChildPath "actions-runner/cached/_diag/pages"
|
||||||
return
|
Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages"
|
||||||
}
|
)
|
||||||
# Go up two directories to get runner root
|
|
||||||
$runnerRoot = Split-Path (Split-Path $runnerProc.Path -Parent) -Parent
|
|
||||||
#Write-Host "`$runnerRoot: $runnerRoot"
|
|
||||||
# Recursively find all _diag/pages folders under the runner root directory
|
|
||||||
$possiblePaths = Get-ChildItem -Path $runnerRoot -Directory -Recurse -Depth 4 -ErrorAction SilentlyContinue |
|
|
||||||
Where-Object { $_.FullName -like "*_diag\pages" -or $_.FullName -like "*_diag/pages" }
|
|
||||||
Write-Host "LogsPaths:"
|
|
||||||
$possiblePaths | ForEach-Object { Write-Host $_.FullName }
|
|
||||||
|
|
||||||
|
|
||||||
$logsFolderPath = $possiblePaths | Where-Object { Test-Path $_ } | Select-Object -First 1
|
$logsFolderPath = $possiblePaths | Where-Object { Test-Path $_ } | Select-Object -First 1
|
||||||
if ($logsFolderPath) {
|
$resolvedPath = Resolve-Path -Path $logsFolderPath -ErrorAction SilentlyContinue
|
||||||
$resolvedPath = Resolve-Path -Path $logsFolderPath -ErrorAction SilentlyContinue
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($resolvedPath -and -not [string]::IsNullOrEmpty($resolvedPath.Path) -and (Test-Path $resolvedPath.Path)) {
|
if ($resolvedPath -and -not [string]::IsNullOrEmpty($resolvedPath.Path) -and (Test-Path $resolvedPath.Path)) {
|
||||||
$useGoLogFile = Get-ChildItem -Path $resolvedPath | Where-Object {
|
$useGoLogFile = Get-ChildItem -Path $resolvedPath | Where-Object {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user