From bcd319b9cfd3bd4784c1f1e9f9b183c83f004357 Mon Sep 17 00:00:00 2001 From: asmo Date: Thu, 19 Jun 2025 16:02:17 +0200 Subject: [PATCH] Merge pull request #825 from asmogo/arm_fix fix arm override --- .github/workflows/docker-publish-arm.yml | 39 +++++------------------- .github/workflows/docker-publish.yml | 23 -------------- 2 files changed, 8 insertions(+), 54 deletions(-) diff --git a/.github/workflows/docker-publish-arm.yml b/.github/workflows/docker-publish-arm.yml index d06fb00d..f3398462 100644 --- a/.github/workflows/docker-publish-arm.yml +++ b/.github/workflows/docker-publish-arm.yml @@ -40,13 +40,13 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=latest,enable=${{ github.event_name == 'release' }} - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=ref,event=branch - type=ref,event=pr - type=sha - ${{ github.event.inputs.tag != '' && github.event.inputs.tag || '' }} + type=raw,value=latest-arm64,enable=${{ github.event_name == 'release' }} + type=semver,pattern={{version}}-arm64 + type=semver,pattern={{major}}.{{minor}}-arm64 + type=ref,event=branch,suffix=-arm64 + type=ref,event=pr,suffix=-arm64 + type=sha,suffix=-arm64 + ${{ github.event.inputs.tag != '' && format('{0}-arm64', github.event.inputs.tag) || '' }} # Build and push ARM64 image with architecture suffix - name: Build and push Docker image @@ -59,27 +59,4 @@ jobs: tags: ${{ steps.meta.outputs.tags }}-arm64 labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha - cache-to: type=gha,mode=max - - # Create and push multi-arch manifest if both images exist - - name: Create and push multi-arch manifest - run: | - # For each tag in the metadata output - echo "${{ steps.meta.outputs.tags }}" | while read -r tag; do - # Check if AMD64 image exists - if docker manifest inspect $tag-amd64 >/dev/null 2>&1; then - # Create manifest - docker manifest create $tag \ - $tag-amd64 \ - $tag-arm64 - - # Annotate the manifest with architecture specific information - docker manifest annotate $tag $tag-amd64 --arch amd64 - docker manifest annotate $tag $tag-arm64 --arch arm64 - - # Push the manifest - docker manifest push $tag - else - echo "AMD64 image not found for $tag, skipping manifest creation" - fi - done \ No newline at end of file + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 598f2ff3..c5223e66 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -59,26 +59,3 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - - # Create and push multi-arch manifest if both images exist - - name: Create and push multi-arch manifest - run: | - # For each tag in the metadata output - echo "${{ steps.meta.outputs.tags }}" | while read -r tag; do - # Check if ARM64 image exists - if docker manifest inspect $tag-arm64 >/dev/null 2>&1; then - # Create manifest - docker manifest create $tag \ - $tag-amd64 \ - $tag-arm64 - - # Annotate the manifest with architecture specific information - docker manifest annotate $tag $tag-amd64 --arch amd64 - docker manifest annotate $tag $tag-arm64 --arch arm64 - - # Push the manifest - docker manifest push $tag - else - echo "ARM64 image not found for $tag, skipping manifest creation" - fi - done \ No newline at end of file