Enhance Docker retention and reusable workflows with critical updates and improvements. Docker retention workflow: - Upgrade to `snok/container-retention-policy` v3.0.0: - Simplify account and image tag parameters. - Improve cut-off format and retain only the most recent image. - Exclude SHAs from multi-platform manifests via a new digest retrieval script. - Add steps for authentication and SHA retrieval to ensure accuracy in image retention. Reusable Docker workflow: - Update `docker/login-action` to v3.2.0. - Upgrade `docker/build-push-action` to v6.3.0. New script: - Add `ci/Get-DockerTagSHAs.ps1` to obtain and exclude SHAs for all non-pre-release tags, preventing the inadvertent removal of necessary multi-arch images. These changes enhance the robustness and efficiency of the Docker retention policy, ensuring compliance with retention goals and maintaining essential multi-platform images.docker-retention
parent
bf4830d799
commit
0145b8ce0c
@ -0,0 +1,11 @@
|
||||
$output = skopeo --override-os linux list-tags docker://ghcr.io/recyclarr/recyclarr
|
||||
$tags = ($output | convertfrom-json).Tags |where-object { $_ -notmatch "dev" }
|
||||
|
||||
$shas = @()
|
||||
foreach ($tag in $tags) {
|
||||
# "Obtain SHAs for tag $tag"
|
||||
$manifests = docker manifest inspect ghcr.io/recyclarr/recyclarr:$tag | ConvertFrom-Json
|
||||
$manifests.manifests | ForEach-Object { $shas += $_.digest }
|
||||
}
|
||||
|
||||
Write-Host $($shas | Select-Object -Unique)
|
Loading…
Reference in new issue