Skip to content

Commit

Permalink
feat(docker): Enable multiarch build for amd64 and arm64
Browse files Browse the repository at this point in the history
Signed-off-by: Helio Chissini de Castro <[email protected]>
  • Loading branch information
heliocastro committed Jan 25, 2024
1 parent edbb3ad commit 56bfbfd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/actions/ortdocker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ runs:
echo $result
echo "result=$result" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker build
if: steps.check_image.outputs.result != 'found'
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -92,6 +95,7 @@ runs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
target: ${{ inputs.name }}
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
load: false
Expand All @@ -108,6 +112,7 @@ runs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
target: ${{ inputs.name }}
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
load: false
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/docker-ort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ jobs:
ORT_VERSION=$(./gradlew -q properties --property version | sed -nr "s/version: (.+)/\1/p")
echo "ORT_VERSION=${ORT_VERSION}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker build
uses: docker/setup-buildx-action@v3

Expand Down Expand Up @@ -332,6 +335,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
target: minimal
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
load: false
Expand Down Expand Up @@ -371,6 +375,9 @@ jobs:
ORT_VERSION=$(./gradlew -q properties --property version | sed -nr "s/version: (.+)/\1/p")
echo "ORT_VERSION=${ORT_VERSION}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker build
uses: docker/setup-buildx-action@v3

Expand Down Expand Up @@ -398,6 +405,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
target: run
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
load: false
Expand Down

0 comments on commit 56bfbfd

Please sign in to comment.