mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 15:57:17 +00:00
[Ubuntu] Add systemd version to software report (#7387)
This commit is contained in:
@@ -371,3 +371,9 @@ function Build-PackageManagementEnvironmentTable {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-SystemdVersion {
|
||||||
|
$matches = [regex]::Matches((systemctl --version | head -n 1), "\((.*?)\)")
|
||||||
|
$result = foreach ($match in $matches) {$match.Groups[1].Value}
|
||||||
|
return $result
|
||||||
|
}
|
||||||
@@ -30,6 +30,7 @@ $softwareReport = [SoftwareReport]::new("Ubuntu $(Get-OSVersionShort)")
|
|||||||
$softwareReport.Root.AddToolVersion("OS Version:", $(Get-OSVersionFull))
|
$softwareReport.Root.AddToolVersion("OS Version:", $(Get-OSVersionFull))
|
||||||
$softwareReport.Root.AddToolVersion("Kernel Version:", $(Get-KernelVersion))
|
$softwareReport.Root.AddToolVersion("Kernel Version:", $(Get-KernelVersion))
|
||||||
$softwareReport.Root.AddToolVersion("Image Version:", $env:IMAGE_VERSION)
|
$softwareReport.Root.AddToolVersion("Image Version:", $env:IMAGE_VERSION)
|
||||||
|
$softwareReport.Root.AddToolVersion("Systemd version:", $(Get-SystemdVersion))
|
||||||
|
|
||||||
$installedSoftware = $softwareReport.Root.AddHeader("Installed Software")
|
$installedSoftware = $softwareReport.Root.AddHeader("Installed Software")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user