diff --git a/dsl-reference.md b/dsl-reference.md index b5539b7e..7e82ac1f 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -907,6 +907,7 @@ do: run: shell: command: 'echo "Hello, ${ .user.name }"' + directory: /tmp - runWorkflow: run: @@ -1027,6 +1028,7 @@ Enables the execution of shell commands within a workflow, enabling workflows to | command | `string` | `yes` | The shell command to run | | stdin | `string` | `no` | A runtime expression, if any, to the shell command as standard input (stdin).| | arguments | `string[]` | `no` | A list of the arguments, if any, of the shell command to run | +| directory | `string` | `no` | The working directory, if any, in which to run the shell command. | | environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured process | ###### Examples @@ -1054,6 +1056,7 @@ do: arguments: - Foo - Bar + directory: /tmp ``` ##### Workflow Process diff --git a/examples/run-shell-stdin-and-arguments.yaml b/examples/run-shell-stdin-and-arguments.yaml index 0f88d0e2..e8e175c2 100644 --- a/examples/run-shell-stdin-and-arguments.yaml +++ b/examples/run-shell-stdin-and-arguments.yaml @@ -18,5 +18,6 @@ do: echo "STDIN was: $input" echo "ARGS are $1 $2" arguments: - - Foo - - Bar + - Foo + - Bar + directory: /tmp diff --git a/schema/workflow.yaml b/schema/workflow.yaml index 01feb5e8..efb27347 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -928,6 +928,10 @@ $defs: description: A list of the arguments, if any, of the shell command to run. items: type: string + directory: + type: string + title: ShellDirectory + description: The working directory, if any, in which to run the shell command. environment: type: object title: ShellEnvironment