Skip to content

Commit

Permalink
Support specifying platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Jul 30, 2024
1 parent 9233d33 commit 8d78c9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/docker-build-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ on:
description: "The name of the image to deploy (default: repo name)"
required: false
type: string
platform:
description: "The image's platform (default: linux/amd64)"
default: "linux/amd64"
required: false
type: string
secrets:
AWS_ACCOUNT_ID:
description: "The AWS account ID used to determine the ECR registry"
Expand Down Expand Up @@ -101,6 +106,7 @@ jobs:
cache-to: type=gha,mode=max
build-args: ${{ secrets.DOCKER_BUILD_ARGS }}
provenance: false
platforms: ${{ inputs.platform }}

- name: Push to Docker Hub
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445
Expand All @@ -116,6 +122,7 @@ jobs:
cache-to: type=gha,mode=max
build-args: ${{ secrets.DOCKER_BUILD_ARGS }}
provenance: false
platforms: ${{ inputs.platform }}

- name: Push to AWS ECR
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445
Expand All @@ -131,3 +138,4 @@ jobs:
cache-to: type=gha,mode=max
build-args: ${{ secrets.DOCKER_BUILD_ARGS }}
provenance: false
platforms: ${{ inputs.platform }}

0 comments on commit 8d78c9d

Please sign in to comment.