Skip to content

Commit

Permalink
Merge pull request #4 from japerry911/japerry911/new/add-dockerfile-i…
Browse files Browse the repository at this point in the history
…nput

Enhance GitHub Action: Add 'dockerfile_path' input and update README
  • Loading branch information
japerry911 authored Jan 22, 2025
2 parents ae665d6 + cea79d5 commit 4b964b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ This action's job is to build a Docker image, and then push it to GCP's Artifact

- This is the GCP Credentials JSON. It is recommended to store the value feeding this input in GitHub secrets.

##### dockerfile_path

- This is the path to the Dockerfile.

##### docker_target

- This is the specified Docker target for Docker build command.
Expand Down
7 changes: 6 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ inputs:
description: "Google Cloud Service Account JSON, it is recommended to feed this with a GitHub secret value."
required: true

dockerfile_path:
description: "Path to the Dockerfile."
required: true
default: "Dockerfile"

docker_target:
description: "Docker target stage."
required: true
Expand Down Expand Up @@ -34,7 +39,7 @@ runs:
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
file: ${{ inputs.dockerfile_path }}
target: ${{ inputs.docker_target }}
push: true
build-args: ${{ inputs.build_args }}
Expand Down

0 comments on commit 4b964b3

Please sign in to comment.