Skip to content

Commit

Permalink
Allow specifying platform to build (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom authored Jan 27, 2023
1 parent a63d5ca commit a3f8316
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/docker-build-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
default: true
required: false
type: boolean
provenance:
description: "Generate provenance attestation for the build"
default: true
required: false
type: boolean
secrets:
AWS_ACCOUNT_ID:
description: "The AWS account ID used to determine the ECR registry"
Expand Down Expand Up @@ -83,17 +88,18 @@ jobs:

- name: Build Docker image
if: ${{steps.dockerfile-exists.outputs.result == 'true' && (inputs.docker_hub || inputs.aws_ecr)}}
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
uses: docker/build-push-action@37abcedcc1da61a57767b7588cb9d03eb57e28b3
with:
context: .
file: ./Dockerfile
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ${{ secrets.DOCKER_BUILD_ARGS }}
provenance: false

- name: Push to Docker Hub
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
uses: docker/build-push-action@37abcedcc1da61a57767b7588cb9d03eb57e28b3
if: ${{steps.dockerfile-exists.outputs.result == 'true' && inputs.docker_hub}}
with:
context: .
Expand All @@ -105,9 +111,10 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ${{ secrets.DOCKER_BUILD_ARGS }}
provenance: false

- name: Push to AWS ECR
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
uses: docker/build-push-action@37abcedcc1da61a57767b7588cb9d03eb57e28b3
if: ${{steps.dockerfile-exists.outputs.result == 'true' && inputs.aws_ecr}}
with:
context: .
Expand All @@ -119,3 +126,4 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ${{ secrets.DOCKER_BUILD_ARGS }}
provenance: false

0 comments on commit a3f8316

Please sign in to comment.