Skip to main content

workdir

The workdir step provisions a mutable directory from a source. It replaces ad hoc shell sequences that create, delete, and copy scratch directories.

steps:
- name: stage fixture
type: workdir
path: .context/e2e/fixture
source: tests/fixtures/example
reset: true

Fields

FieldDescription
pathRequired target directory. Relative paths resolve from the current process directory.
sourceRequired source URI or source specification. Supports the same source forms as vendoring.
resetReplace an existing target directory. Without it, an existing target is protected.

The step result is the provisioned absolute path and metadata records the path and resolved source.