feat: add target input for multi-stage Docker builds

Allows callers to specify a Docker build target stage (e.g. target: production)
for multi-stage Dockerfiles. Empty default preserves backward compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martin Maslyankov
2026-04-03 01:13:28 +03:00
parent deaf9a9890
commit 42497cecb1

View File

@@ -29,6 +29,11 @@ on:
required: false required: false
type: string type: string
default: "" default: ""
target:
description: "Docker build target stage (for multi-stage builds)"
required: false
type: string
default: ""
runner: runner:
description: "Runner label to use (e.g. ubuntu-latest, self-hosted-arm64). ARM64 builds use QEMU emulation on amd64 runners by default — set this to a native ARM64 runner for faster Rust/heavy builds." description: "Runner label to use (e.g. ubuntu-latest, self-hosted-arm64). ARM64 builds use QEMU emulation on amd64 runners by default — set this to a native ARM64 runner for faster Rust/heavy builds."
required: false required: false
@@ -103,6 +108,7 @@ jobs:
with: with:
context: ${{ inputs.context }} context: ${{ inputs.context }}
file: ${{ inputs.context }}/${{ inputs.dockerfile }} file: ${{ inputs.context }}/${{ inputs.dockerfile }}
target: ${{ inputs.target || '' }}
platforms: ${{ inputs.platforms }} platforms: ${{ inputs.platforms }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}