diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0ae0342..eed58df 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -153,8 +153,12 @@ jobs: - chapters-windows-ltsc2025 runs-on: ubuntu-latest steps: - - name: Registry login - uses: docker/login-action@v3 + - uses: regclient/actions/regctl-installer@main + - uses: regclient/actions/regctl-login@main + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} diff --git a/build/push-manifests.ps1 b/build/push-manifests.ps1 index f831330..7477053 100644 --- a/build/push-manifests.ps1 +++ b/build/push-manifests.ps1 @@ -2,6 +2,8 @@ param( [string]$Filter=$null, [switch]$Images=$true, [switch]$Chapters=$false, + [switch]$UseRegctl=$true, + [switch]$Delete=$false, [switch]$Pull=$false ) @@ -49,20 +51,28 @@ try { $variantList = @() foreach ($variant in $variants) { $ref = "$($image)-$variant" - $manifest = docker manifest inspect $ref | ConvertFrom-Json + if ($UseRegctl) { + $manifest = regctl manifest get $ref --format raw-body | ConvertFrom-Json + } + else { + $manifest = docker manifest inspect $ref | ConvertFrom-Json + } if ($null -ne $manifest -and $manifest.mediaType -eq $manifestMediaType) { $variantList += $ref echo "** Image variant found. Will add to manifest list: $ref" } else { - echo "** Image variant found. Skipping: $ref" + echo "** Image variant NOT found. Skipping: $ref" } } - docker manifest rm $image + if ($Delete) { + docker manifest rm $image + } + docker manifest create --amend $image @variantList docker manifest push $image - + if ($Pull) { docker pull $image }