From 7d3079d8844f1cffe8a2391d9fc0bcac0669e7f6 Mon Sep 17 00:00:00 2001 From: "Maxim [maxirmx] Samsonov" Date: Mon, 20 Jan 2025 13:34:15 +0300 Subject: [PATCH] fix: latest tag manifest --- .github/workflows/build-containers.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index a2d526b..94ab5ae 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -129,15 +129,17 @@ jobs: - name: Create SHA manifest and push run: | for tag in $(echo "${{ needs.build-containers.outputs.tags }}" | tr ',' '\n'); do - base_tag=$(echo $tag | sed -E 's/.*:(.*)-(amd64|arm64)/\1/') - if [ "$base_tag" != "latest" ]; then - echo "Processing $tag, using base tag $base_tag" - docker manifest create \ - ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag \ - --amend ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag-amd64 \ - --amend ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag-arm64 - docker manifest push ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag + if [[ $tag == *:latest ]]; then + base_tag="latest" + else + base_tag=$(echo $tag | sed -E 's/.*:(.*)-(amd64|arm64)/\1/') fi + echo "Processing $tag, using base tag $base_tag" + docker manifest create \ + ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag \ + --amend ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag-amd64 \ + --amend ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag-arm64 + docker manifest push ghcr.io/tamatebako/tebako-${{ matrix.container }}:$base_tag done dispatch-dependent-repositories: