Examples

Bake adapter ownership without shell cwd or -f drift

A focused contract that keeps Bake adapter root and file selection on task or workflow surfaces instead of shell glue.

copynew usersbasicstable2026-05-30

Typical signals

  • the repo uses docker buildx bake and the adapter root plus file stack are part of the real operating model
  • one task path or one workflow owns base Bake files plus narrower overlays
  • shell -f / --file flags are obscuring contract truth that should stay reviewable

Why it matters

  • it turns a repo pattern into something humans, CI, and agents can read the same way
  • it makes the next command obvious instead of implied by README drift
  • it keeps readiness, setup, and execution explainable in receipts and diagnostics

Example contract

Use this when the task is really a Bake invocation and the hard part is keeping the adapter root plus file stack explicit instead of burying them in shell glue.

The example separates task-owned Bake ownership from workflow-owned base overlays so selected-path ownership stays honest.

ota.yamlyaml
version: 1project:  name: bake-adapter-inputs  description: Focused example for task-owned and workflow-owned Bake file ownershipexecution:  default_context: host  contexts:    host:      backend: native      requirements:        tools:          docker: "*"tasks:  bake:image:    adapter_inputs:      bake:        cwd: docker        files:          - docker/docker-bake.hcl    command:      exe: docker      args:        - buildx        - bake        - app    requirements:      tools:        docker: "*"  bake:workflow:    command:      exe: docker      args:        - buildx        - bake        - app    requirements:      tools:        docker: "*"workflows:  default: release  release:    env:      adapter_inputs:        bake:          cwd: docker          files:            - docker/docker-bake.hcl            - docker/docker-bake.platform.hcl            - docker/docker-bake.release.hcl    run:      task: bake:workflow

Task notes

Use task-local adapter_inputs.bake.cwd and .files when one task path owns the truthful Bake working directory and file stack.

Use workflows.<name>.env.adapter_inputs.bake.cwd and .files when the selected workflow should own the base Bake root and prepend the base file stack across its selected task closure.

Do not duplicate both on the same selected path. If one workflow already owns the base Bake root or file stack, keep the selected task body free of duplicate Bake ownership.