bake-action icon indicating copy to clipboard operation
bake-action copied to clipboard

add context input to replace workdir and source inputs

Open crazy-max opened this issue 2 weeks ago • 2 comments

  • fixes https://github.com/docker/bake-action/issues/294
  • fixes https://github.com/docker/bake-action/issues/301
  • fixes https://github.com/docker/bake-action/issues/352

This PR introduces a new context input that replaces both workdir and source inputs. It resolves long-standing confusion around how bake-action determines what directory or Git reference to use when running bake.

The workdir input was originally added in https://github.com/docker/bake-action/pull/76 to support running Bake from a subdirectory inside the GitHub workspace.

Later, Git context support was added in https://github.com/docker/bake-action/pull/181 introducing a new source input. This created overlap and ambiguity between:

  • workdir (local path inside workspace)
  • source (Git context but can be skipped with .)

This duality has consistently caused confusion for users, as highlighted in multiple issues and discussions. Users also pointed out that naming was inconsistent with build-push-action, where the input is called context.

This unified context input aligns with build-push-action. If a local dir is detected it will use it as working directory to run Bake otherwise it will use the Git context like it does for build-push-action.

cc @ModerNews @polarathene @Clashsoft

crazy-max avatar Dec 05 '25 15:12 crazy-max