mirror of
https://github.com/actions/node-versions.git
synced 2026-01-14 12:00:41 +08:00
Compare commits
1 Commits
24.13.0-20
...
fix-arm64-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca984f3f5d |
4
.github/workflows/build-node-packages.yml
vendored
4
.github/workflows/build-node-packages.yml
vendored
@@ -23,9 +23,9 @@ on:
|
||||
jobs:
|
||||
node:
|
||||
name: Node
|
||||
uses: actions/versions-package-tools/.github/workflows/build-tool-packages.yml@main
|
||||
uses: actions/versions-package-tools/.github/workflows/build-tool-packages.yml@arm64-7z-issue-fix
|
||||
with:
|
||||
tool-name: "node"
|
||||
tool-version: ${{ inputs.VERSION || '18.12.0' }}
|
||||
publish-release: ${{ inputs.PUBLISH_RELEASES || false }}
|
||||
secrets: inherit
|
||||
secrets: inherit
|
||||
|
||||
4
.github/workflows/get-node-versions.yml
vendored
4
.github/workflows/get-node-versions.yml
vendored
@@ -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
|
||||
@@ -6,41 +6,15 @@ Describe "Node.js" {
|
||||
|
||||
BeforeAll {
|
||||
function Get-UseNodeLogs {
|
||||
$runnerProc = Get-Process -Name "Runner.Listener" -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||
#Write-Host "`$runnerProc: $($runnerProc | Out-String)"
|
||||
if (-not $runnerProc -or -not $runnerProc.Path) {
|
||||
Write-Error "Runner.Listener process not found."
|
||||
return
|
||||
}
|
||||
# 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
|
||||
if ($logsFolderPath) {
|
||||
$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"
|
||||
}
|
||||
# GitHub Windows images don't have `HOME` variable
|
||||
$homeDir = $env:HOME ?? $env:HOMEDRIVE
|
||||
$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
Reference in New Issue
Block a user