diff --git a/.github/workflows/docker-ci-cd.yml b/.github/workflows/docker-ci-cd.yml index 0ea679a..bd535fb 100644 --- a/.github/workflows/docker-ci-cd.yml +++ b/.github/workflows/docker-ci-cd.yml @@ -170,9 +170,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: - driver: cloud - endpoint: "zx8086/cldbuild" - install: true + platforms: linux/amd64,linux/arm64 # Build and push section - name: Build and push Docker image @@ -184,11 +182,8 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 - cache-from: | - type=registry,ref=docker.io/zx8086/capella-document-search:buildcache - cache-to: | - type=registry,ref=docker.io/zx8086/capella-document-search:buildcache,mode=max - outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }} + cache-from: type=registry,ref=docker.io/zx8086/capella-document-search:buildcache + cache-to: type=registry,ref=docker.io/zx8086/capella-document-search:buildcache,mode=max provenance: false - name: Create multi-arch manifest @@ -197,11 +192,13 @@ jobs: # Wait for images to be available sleep 15 - # Create and push the manifest for latest tag - docker buildx imagetools create \ - -t docker.io/zx8086/capella-document-search:latest \ - docker.io/zx8086/capella-document-search:master - + # Create and push manifest lists + docker manifest create docker.io/zx8086/capella-document-search:latest \ + --amend docker.io/zx8086/capella-document-search:latest-linux-amd64 \ + --amend docker.io/zx8086/capella-document-search:latest-linux-arm64 + + docker manifest push docker.io/zx8086/capella-document-search:latest + # Verify the manifest echo "Verifying manifest..." docker buildx imagetools inspect docker.io/zx8086/capella-document-search:latest