Skip to content

Commit cc67c70

Browse files
committed
feat: Build docker image with both amd64 and arm64 support
Signed-off-by: Helio Chissini de Castro <[email protected]>
1 parent 451101d commit cc67c70

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/docker-build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
branches:
99
- main
1010
tags:
11-
- "[0-9]+.[0-9]+.[0-9]+"
11+
- '[0-9]+.[0-9]+.[0-9]+'
1212
workflow_dispatch:
1313

1414
env:
@@ -32,6 +32,8 @@ jobs:
3232
run: |
3333
ORT_VERSION=$(./gradlew -q printVersion)
3434
echo "ORT_VERSION=${ORT_VERSION}" >> $GITHUB_ENV
35+
- name: Set up QEMU
36+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
3537
- name: Set up Docker Buildx
3638
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
3739
- name: Login to GitHub Container Registry
@@ -63,6 +65,7 @@ jobs:
6365
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository_owner }}/ort:cache
6466
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository_owner }}/ort:cache,mode=max
6567
build-args: ORT_VERSION=${{ env.ORT_VERSION }}
68+
platforms: linux/amd64,linux/arm64
6669
sbom: true
6770
- name: Build 'ort' Docker Image
6871
if: ${{ github.event_name == 'pull_request' }}
@@ -73,6 +76,7 @@ jobs:
7376
labels: ${{ steps.meta-ort.outputs.labels }}
7477
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository_owner }}/ort:cache
7578
build-args: ORT_VERSION=${{ env.ORT_VERSION }}
79+
platforms: linux/amd64,linux/arm64
7680
sbom: true
7781
- name: Extract Metadata for 'ort-minimal' Docker Image
7882
id: meta-ort-minimal
@@ -98,6 +102,7 @@ jobs:
98102
target: minimal
99103
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository_owner }}/ort:cache
100104
build-args: ORT_VERSION=${{ env.ORT_VERSION }}
105+
platforms: linux/amd64,linux/arm64
101106
sbom: true
102107
- name: Print Disk Space
103108
run: df -h

0 commit comments

Comments
 (0)