Skip to content

Commit

Permalink
Merge pull request #21 from mobilecoinofficial/docker-multi-arch
Browse files Browse the repository at this point in the history
docker multi-platform build support
  • Loading branch information
jgreat authored Oct 9, 2024
2 parents 0bab92b + 90b484a commit d108c55
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ inputs:
required: false
default: |
latest=true
platforms:
description: comma separated list of platforms to build for linux/amd64,linux/arm64
default: ""
required: false
emulation:
description: Use QEMU to emulate other platforms
default: "false"
required: false
images:
description: URL/Path to docker image registry
required: true
Expand Down Expand Up @@ -61,6 +69,11 @@ runs:
images: ${{ inputs.images }}
tags: ${{ inputs.tags }}

# set up multi-arch support emulation
- name: Set up QEMU
if: inputs.emulation == 'true'
uses: docker/setup-qemu-action@v3

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

Expand All @@ -72,12 +85,13 @@ runs:
password: ${{ inputs.password }}

- name: Publish to DockerHub
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
build-args: ${{ inputs.build_args }}
context: ${{ inputs.context }}
file: ${{ inputs.dockerfile }}
labels: ${{ steps.docker_meta.outputs.labels }}
platforms: ${{ inputs.platforms }}
push: ${{ inputs.push }}
tags: ${{ steps.docker_meta.outputs.tags }}
target: ${{ inputs.target }}

0 comments on commit d108c55

Please sign in to comment.