Skip to content

Commit

Permalink
Support passing in Docker build args (exercism#100)
Browse files Browse the repository at this point in the history
* Allow passing in docker build args
  • Loading branch information
ErikSchierboom authored Jan 3, 2023
1 parent 1f99238 commit 682a82e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docker-build-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ on:
DOCKERHUB_PASSWORD:
description: "The password used to log into Docker Hub"
required: true
DOCKER_BUILD_ARGS:
description: "Docker build arguments"
required: false

permissions:
contents: write
Expand Down Expand Up @@ -87,6 +90,7 @@ jobs:
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ${{ secrets.DOCKER_BUILD_ARGS }}

- name: Push to Docker Hub
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
Expand All @@ -100,6 +104,7 @@ jobs:
${{ github.event.repository.full_name }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ${{ secrets.DOCKER_BUILD_ARGS }}

- name: Push to AWS ECR
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
Expand All @@ -113,3 +118,4 @@ jobs:
${{ env.ECR_REGISTRY }}/${{ github.event.repository.name }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: ${{ secrets.DOCKER_BUILD_ARGS }}

0 comments on commit 682a82e

Please sign in to comment.