Compare commits

..

No commits in common. "main" and "22.12.0-12152383658" have entirely different histories.

3 changed files with 9 additions and 1449 deletions

View File

@ -1,7 +1,7 @@
name: Get Node versions
on:
schedule:
- cron: '0 0,12 * * *'
- cron: '0 3,15 * * *'
workflow_dispatch:
jobs:
@ -10,4 +10,4 @@ jobs:
with:
tool-name: "Node"
image-url: "https://nodejs.org/static/images/logo-hexagon-card.png"
secrets: inherit
secrets: inherit

View File

@ -8,30 +8,13 @@ Describe "Node.js" {
function Get-UseNodeLogs {
# GitHub Windows images don't have `HOME` variable
$homeDir = $env:HOME ?? $env:HOMEDRIVE
$possiblePaths = @(
Join-Path -Path $homeDir -ChildPath "actions-runner/cached/_diag/pages"
Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages"
)
$logsFolderPath = $possiblePaths | Where-Object { Test-Path $_ } | Select-Object -First 1
$resolvedPath = Resolve-Path -Path $logsFolderPath -ErrorAction SilentlyContinue
if ($resolvedPath -and -not [string]::IsNullOrEmpty($resolvedPath.Path) -and (Test-Path $resolvedPath.Path)) {
$useNodeLogFile = Get-ChildItem -Path $resolvedPath | Where-Object {
$logContent = Get-Content $_.Fullname -Raw
return $logContent -match "setup-node@v"
} | Select-Object -First 1
# Return the file name if a match is found
if ($useNodeLogFile) {
return $useNodeLogFile.FullName
} else {
Write-Error "No matching log file found in the specified path: $($resolvedPath.Path)"
}
} else {
Write-Error "The provided logs folder path is null, empty, or does not exist: $logsFolderPath"
}
$logsFolderPath = Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages" -Resolve
$useNodeLogFile = Get-ChildItem -Path $logsFolderPath | Where-Object {
$logContent = Get-Content $_.Fullname -Raw
return $logContent -match "setup-node@v"
} | Select-Object -First 1
return $useNodeLogFile.Fullname
}
}

File diff suppressed because it is too large Load Diff