Skip to content

Commit

Permalink
chore: impl Step::working_directory (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddOnTop authored Nov 8, 2024
1 parent bc7fe0e commit d5a2987
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions workspace/gh-workflow/src/workflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ pub struct Step<T> {
#[serde(skip_serializing_if = "Option::is_none")]
pub continue_on_error: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
#[setters(skip)]
pub working_directory: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub retry: Option<RetryStrategy>,
Expand All @@ -275,6 +276,10 @@ impl<T> Step<T> {
pub fn env<R: SetEnv<Self>>(self, env: R) -> Self {
env.apply(self)
}
pub fn working_directory<S: ToString>(mut self, working_directory: S) -> Self {
self.working_directory = Some(working_directory.to_string());
self
}
}

impl<T> AddStep for Step<T>
Expand Down

0 comments on commit d5a2987

Please sign in to comment.