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 8bc2376 commit 88b45ff
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/docker-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,25 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ matrix.platform }}
platforms: linux/amd64,linux/arm64 # Build both platforms in one go
cache-from: |
type=registry,ref=docker.io/zx8086/capella-document-search:buildcache-${{ matrix.platform-name }}
cache-to: |
type=registry,ref=docker.io/zx8086/capella-document-search:buildcache-${{ matrix.platform-name }},mode=max
outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }}
provenance: false

- name: Create and push multi-platform manifest
if: github.event_name != 'pull_request'
run: |
echo "Creating multi-platform manifest..."
docker buildx imagetools create -t docker.io/zx8086/capella-document-search:latest \
docker.io/zx8086/capella-document-search:latest
# Verify the manifest
echo "Verifying manifest..."
docker buildx imagetools inspect docker.io/zx8086/capella-document-search:latest
- name: Push image with digest
if: github.event_name != 'pull_request'
run: |
Expand Down

0 comments on commit 88b45ff

Please sign in to comment.