mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
Sort docker images by name in documentation (#2716)
Sort docker images by name in documentation
This commit is contained in:
@@ -268,14 +268,15 @@ function Get-CachedDockerImages {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-CachedDockerImagesTableData {
|
function Get-CachedDockerImagesTableData {
|
||||||
return (sudo docker images --digests --format "*{{.Repository}}:{{.Tag}}|{{.Digest}} |{{.CreatedAt}}").Split("*") | Where-Object { $_ } | ForEach-Object {
|
$allImages = sudo docker images --digests --format "*{{.Repository}}:{{.Tag}}|{{.Digest}} |{{.CreatedAt}}"
|
||||||
$parts=$_.Split("|")
|
$allImages.Split("*") | Where-Object { $_ } | ForEach-Object {
|
||||||
[PSCustomObject] @{
|
$parts = $_.Split("|")
|
||||||
"Repository:Tag" = $parts[0]
|
[PSCustomObject] @{
|
||||||
"Digest" = $parts[1]
|
"Repository:Tag" = $parts[0]
|
||||||
"Created" = $parts[2].split(' ')[0]
|
"Digest" = $parts[1]
|
||||||
}
|
"Created" = $parts[2].split(' ')[0]
|
||||||
}
|
}
|
||||||
|
} | Sort-Object -Property "Repository:Tag"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-AptPackages {
|
function Get-AptPackages {
|
||||||
|
|||||||
@@ -294,14 +294,15 @@ function Get-CachedDockerImages {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-CachedDockerImagesTableData {
|
function Get-CachedDockerImagesTableData {
|
||||||
return (docker images --digests --format "*{{.Repository}}:{{.Tag}}|{{.Digest}} |{{.CreatedAt}}").Split("*") | Where-Object { $_ } | ForEach-Object {
|
$allImages = docker images --digests --format "*{{.Repository}}:{{.Tag}}|{{.Digest}} |{{.CreatedAt}}"
|
||||||
$parts=$_.Split("|")
|
$allImages.Split("*") | Where-Object { $_ } | ForEach-Object {
|
||||||
[PSCustomObject] @{
|
$parts = $_.Split("|")
|
||||||
"Repository:Tag" = $parts[0]
|
[PSCustomObject] @{
|
||||||
"Digest" = $parts[1]
|
"Repository:Tag" = $parts[0]
|
||||||
"Created" = $parts[2].split(' ')[0]
|
"Digest" = $parts[1]
|
||||||
}
|
"Created" = $parts[2].split(' ')[0]
|
||||||
}
|
}
|
||||||
|
} | Sort-Object -Property "Repository:Tag"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-ShellTarget {
|
function Get-ShellTarget {
|
||||||
|
|||||||
Reference in New Issue
Block a user