add dockerfile input for monorepos
Lets a caller point at a non-default Dockerfile while keeping the build context broader. Needed for repos with multiple binaries sharing internal packages (api/Dockerfile + worker/Dockerfile, build context at repo root). Empty default preserves prior behavior. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,14 @@ inputs:
|
||||
description: Docker build context path
|
||||
required: false
|
||||
default: .
|
||||
dockerfile:
|
||||
description: |
|
||||
Path to the Dockerfile, relative to the context (or absolute under
|
||||
$GITHUB_WORKSPACE). Defaults to "Dockerfile" inside the context.
|
||||
Use this for monorepos where the build context is the repo root but
|
||||
the Dockerfile lives in a subdir (e.g. dockerfile: api/Dockerfile).
|
||||
required: false
|
||||
default: ''
|
||||
build-args:
|
||||
description: Multiline KEY=VALUE pairs passed to docker build
|
||||
required: false
|
||||
@@ -29,6 +37,7 @@ runs:
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ${{ inputs.context }}
|
||||
file: ${{ inputs.dockerfile }}
|
||||
push: false
|
||||
load: true
|
||||
provenance: false
|
||||
|
||||
Reference in New Issue
Block a user