mirror of
https://github.com/actions/node-versions.git
synced 2025-12-15 21:37:34 +08:00
Compare commits
44 Commits
22.7.0-105
...
update-ver
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8493c9d403 | ||
|
|
ff3fc4cc4e | ||
|
|
5c7702bb19 | ||
|
|
318aa75a51 | ||
|
|
7cc031e877 | ||
|
|
b9b8a06ea4 | ||
|
|
64801c3590 | ||
|
|
a2eca09038 | ||
|
|
fcfdeb317e | ||
|
|
b32305dc94 | ||
|
|
018c97355d | ||
|
|
82b9d6eb7f | ||
|
|
6c1dcef7e3 | ||
|
|
414aa4b42d | ||
|
|
05932b3923 | ||
|
|
8bc7882285 | ||
|
|
447f233d8c | ||
|
|
48d06ac109 | ||
|
|
2f48f5f179 | ||
|
|
7bff9a2a32 | ||
|
|
ef431e4d6b | ||
|
|
498365717c | ||
|
|
8c7740e607 | ||
|
|
6fda0935f2 | ||
|
|
e25da9dc7c | ||
|
|
3de2515c74 | ||
|
|
89d81124fa | ||
|
|
c5d5eb32a4 | ||
|
|
48b638b2a7 | ||
|
|
70176e8e7f | ||
|
|
b8e2e0988f | ||
|
|
6f7e07ce98 | ||
|
|
759e7130a4 | ||
|
|
708c79f819 | ||
|
|
ff0573dc52 | ||
|
|
f3742acb8e | ||
|
|
b5d073fd75 | ||
|
|
07972c08eb | ||
|
|
1089754c37 | ||
|
|
d0b553a9eb | ||
|
|
09e0810728 | ||
|
|
83c0f2d854 | ||
|
|
1dda8b0c7d | ||
|
|
a09329c1fa |
2
.github/workflows/get-node-versions.yml
vendored
2
.github/workflows/get-node-versions.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
name: Get Node versions
|
name: Get Node versions
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 3,15 * * *'
|
- cron: '0 0,12 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -8,13 +8,31 @@ Describe "Node.js" {
|
|||||||
function Get-UseNodeLogs {
|
function Get-UseNodeLogs {
|
||||||
# GitHub Windows images don't have `HOME` variable
|
# GitHub Windows images don't have `HOME` variable
|
||||||
$homeDir = $env:HOME ?? $env:HOMEDRIVE
|
$homeDir = $env:HOME ?? $env:HOMEDRIVE
|
||||||
$logsFolderPath = Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages" -Resolve
|
|
||||||
|
|
||||||
$useNodeLogFile = Get-ChildItem -Path $logsFolderPath | Where-Object {
|
$possiblePaths = @(
|
||||||
$logContent = Get-Content $_.Fullname -Raw
|
Join-Path -Path $homeDir -ChildPath "actions-runner/cached/_diag/pages"
|
||||||
return $logContent -match "setup-node@v"
|
Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages"
|
||||||
} | Select-Object -First 1
|
Join-Path -Path $homeDir -ChildPath "actions-runner/extracted/_diag/pages"
|
||||||
return $useNodeLogFile.Fullname
|
)
|
||||||
|
|
||||||
|
$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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user