diff --git a/docker/build-push/README.md b/docker/build-push/README.md index 8720bc8..51634bb 100644 --- a/docker/build-push/README.md +++ b/docker/build-push/README.md @@ -46,6 +46,8 @@ The caller owns the job. A composite action can't set `runs-on`, `matrix`, | `push` | no | `true` | Push the image; set `"false"` for PR validation builds. | | `platforms` | no | `''` | Target platforms, newline- or comma-separated (e.g. `linux/arm64`). Empty = the runner's native platform only. | | `build-contexts` | no | `''` | Additional named build contexts, one `name=source` per line (see [Build contexts](#build-contexts)). | +| `target` | no | `''` | Dockerfile stage to build. Empty = the last stage. | +| `build-args` | no | `''` | Build arguments, one `KEY=VALUE` per line. | | `username` | no | `''` | Registry username. Required unless the registry is `ghcr.io`. | | `password` | no | `''` | Registry password. Required unless the registry is `ghcr.io`. | diff --git a/docker/build-push/action.yml b/docker/build-push/action.yml index fa1b65b..fd428b0 100644 --- a/docker/build-push/action.yml +++ b/docker/build-push/action.yml @@ -69,6 +69,16 @@ inputs: a context by name in FROM or COPY --from. Empty = none.' required: false default: "" + target: + description: "Dockerfile stage to build. Empty = the last stage." + required: false + default: "" + build-args: + description: + 'Build arguments, one "KEY=VALUE" per line, passed to + docker/build-push-action unchanged. Empty = none.' + required: false + default: "" username: description: "Registry username. Required unless the registry is ghcr.io." required: false @@ -134,6 +144,8 @@ runs: push: ${{ inputs.push }} platforms: ${{ steps.prep.outputs.platforms }} build-contexts: ${{ inputs.build-contexts }} + target: ${{ inputs.target }} + build-args: ${{ inputs.build-args }} tags: ${{ steps.prep.outputs.tags }} cache-from: ${{ steps.prep.outputs.cache-from }} cache-to: ${{ steps.prep.outputs.cache-to }}