Skip to content

Commit 6a12c3d

Browse files
authored
feat: add dockerfile_path option to build-and-push workflow (#80)
Following up on PR #79, in this commit, we add the `dockerfile_path` option to the `build-and-push` reusable workflow ## Related Tickets & Documents * MZCLD-634
1 parent 434f3fb commit 6a12c3d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/build-and-push.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ on:
3737
required: false
3838
type: string
3939
default: "./"
40+
dockerfile_path:
41+
required: false
42+
type: string
43+
default: "./Dockerfile"
4044
image_tag_metadata:
4145
required: false
4246
type: string
@@ -98,6 +102,7 @@ jobs:
98102
gar_name: ${{ inputs.gar_name }}
99103
project_id: ${{ inputs.project_id }}
100104
image_build_context: ${{ inputs.image_build_context }}
105+
dockerfile_path: ${{ inputs.dockerfile_path }}
101106
image_tag_metadata: ${{ inputs.image_tag_metadata }}
102107
should_tag_ghcr: ${{ inputs.should_tag_ghcr }}
103108
should_tag_latest: ${{ inputs.should_tag_latest }}

.github/workflows/docs/build-and-push.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ these inputs.
2525
| `workload_identity_pool_project_number` | false | string | GCP workload identity pool project number. (default: `${{ vars.GCPV2_WORKLOAD_IDENTITY_POOL_PROJECT_NUMBER }}`) |
2626
| `prebuild_script` | false | string | Shell script (either inline or path to script) to run before building the image. (default: *see below)* |
2727
| `postbuild_script` | false | string | Shell script (either inline or path to script) to run after building the image. |
28-
| `image_build_context` | false | string | Build context path. (default: `"./"`) |
28+
| `image_build_context` | false | string | Build context path. Default value is relative to the repository root. (default: `"./"`) |
29+
| `dockerfile_path` | false | string | Path to Dockerfile. Default value is relative to the repository root. (default: `"./Dockerfile"`) |
2930
| `image_tag_metadata` | false | string | Additional metadata for image tagging. |
3031
| `should_tag_ghcr` | false | boolean | Whether to also tag and push the image to GHCR. (default: `false`) |
3132
| `should_tag_latest` | false | boolean | Whether to tag the image as `latest`. (default: `false`) |

0 commit comments

Comments
 (0)