From d5a2987bb6aadbf0430b7a712f9f63d6552acf3e Mon Sep 17 00:00:00 2001 From: Sandipsinh Dilipsinh Rathod <62684960+ssddOnTop@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:59:10 -0500 Subject: [PATCH] chore: impl `Step::working_directory` (#29) --- workspace/gh-workflow/src/workflow.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/workspace/gh-workflow/src/workflow.rs b/workspace/gh-workflow/src/workflow.rs index a8d9ba3..ed5e7af 100644 --- a/workspace/gh-workflow/src/workflow.rs +++ b/workspace/gh-workflow/src/workflow.rs @@ -256,6 +256,7 @@ pub struct Step { #[serde(skip_serializing_if = "Option::is_none")] pub continue_on_error: Option, #[serde(skip_serializing_if = "Option::is_none")] + #[setters(skip)] pub working_directory: Option, #[serde(skip_serializing_if = "Option::is_none")] pub retry: Option, @@ -275,6 +276,10 @@ impl Step { pub fn env>(self, env: R) -> Self { env.apply(self) } + pub fn working_directory(mut self, working_directory: S) -> Self { + self.working_directory = Some(working_directory.to_string()); + self + } } impl AddStep for Step