Skip to content

Commit

Permalink
Multi-build manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
zx8086 committed Jan 20, 2025
1 parent de7e7cd commit 2f5c120
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/docker-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2f5c120

Please sign in to comment.