From 2614be227181b752a0f22551f058aae5f5fc0e87 Mon Sep 17 00:00:00 2001 From: Hannes de Jager Date: Sat, 31 Oct 2026 20:25:05 +0700 Subject: [PATCH] Publish latest for stable Alpine releases After all versioned images are published, copy the Alpine image index to latest in Docker Hub and GHCR. Skip prereleases so they cannot move the stable tag, and verify that each copy keeps the source digest. --- .github/workflows/rust.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1332882..98ba6d6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -549,3 +549,17 @@ jobs: tags: | ${{ env.DOCKERHUB_NAMESPACE }}/unftp:${{ env.BUILD_VERSION }}-alpine-debug ghcr.io/cloudinvoke/unftp:${{ env.BUILD_VERSION }}-alpine-debug + + - name: Tag stable Alpine image as latest + if: ${{ !github.event.release.prerelease }} + run: | + set -euo pipefail + + for repository in "${DOCKERHUB_NAMESPACE}/unftp" ghcr.io/cloudinvoke/unftp; do + source="${repository}:${BUILD_VERSION}-alpine" + target="${repository}:latest" + source_digest=$(docker buildx imagetools inspect "$source" --format '{{.Manifest.Digest}}') + docker buildx imagetools create --tag "$target" "$source" + target_digest=$(docker buildx imagetools inspect "$target" --format '{{.Manifest.Digest}}') + test "$target_digest" = "$source_digest" + done