pub struct Job {Show 20 fields
pub needs: Option<Vec<String>>,
pub cond: Option<Expression>,
pub name: Option<String>,
pub runs_on: Option<RunsOn>,
pub permissions: Option<Permissions>,
pub environment: Option<Environment>,
pub concurrency: Option<Concurrency>,
pub outputs: Option<IndexMap<String, String>>,
pub env: Option<Env>,
pub defaults: Option<Defaults>,
pub timeout_minutes: Option<u32>,
pub continue_on_error: Option<bool>,
pub container: Option<Container>,
pub services: Option<IndexMap<String, Container>>,
pub strategy: Option<Strategy>,
pub steps: Option<Vec<StepValue>>,
pub uses: Option<String>,
pub secrets: Option<IndexMap<String, Secret>>,
pub retry: Option<RetryStrategy>,
pub artifacts: Option<Artifacts>,
}Expand description
Represents a job in the workflow. Field order matches GitHub Actions YAML structure for better readability.
Fields§
§needs: Option<Vec<String>>§cond: Option<Expression>§name: Option<String>§runs_on: Option<RunsOn>§permissions: Option<Permissions>§environment: Option<Environment>§concurrency: Option<Concurrency>§outputs: Option<IndexMap<String, String>>§env: Option<Env>§defaults: Option<Defaults>§timeout_minutes: Option<u32>§continue_on_error: Option<bool>§container: Option<Container>§services: Option<IndexMap<String, Container>>§strategy: Option<Strategy>§steps: Option<Vec<StepValue>>§uses: Option<String>§secrets: Option<IndexMap<String, Secret>>§retry: Option<RetryStrategy>§artifacts: Option<Artifacts>Implementations§
Source§impl Job
impl Job
Sourcepub fn cond(self, value: impl Into<Expression>) -> Self
pub fn cond(self, value: impl Into<Expression>) -> Self
Sets the cond field of this struct.
Sourcepub fn permissions(self, value: impl Into<Permissions>) -> Self
pub fn permissions(self, value: impl Into<Permissions>) -> Self
Sets the permissions field of this struct.
Sourcepub fn environment(self, value: impl Into<Environment>) -> Self
pub fn environment(self, value: impl Into<Environment>) -> Self
Sets the environment field of this struct.
Sourcepub fn concurrency(self, value: impl Into<Concurrency>) -> Self
pub fn concurrency(self, value: impl Into<Concurrency>) -> Self
Sets the concurrency field of this struct.
Sourcepub fn outputs(self, value: impl Into<IndexMap<String, String>>) -> Self
pub fn outputs(self, value: impl Into<IndexMap<String, String>>) -> Self
Sets the outputs field of this struct.
Sourcepub fn defaults(self, value: impl Into<Defaults>) -> Self
pub fn defaults(self, value: impl Into<Defaults>) -> Self
Sets the defaults field of this struct.
Sourcepub fn timeout_minutes(self, value: impl Into<u32>) -> Self
pub fn timeout_minutes(self, value: impl Into<u32>) -> Self
Sets the timeout_minutes field of this struct.
Sourcepub fn continue_on_error(self, value: impl Into<bool>) -> Self
pub fn continue_on_error(self, value: impl Into<bool>) -> Self
Sets the continue_on_error field of this struct.
Sourcepub fn container(self, value: impl Into<Container>) -> Self
pub fn container(self, value: impl Into<Container>) -> Self
Sets the container field of this struct.
Sourcepub fn services(self, value: impl Into<IndexMap<String, Container>>) -> Self
pub fn services(self, value: impl Into<IndexMap<String, Container>>) -> Self
Sets the services field of this struct.
Sourcepub fn strategy(self, value: impl Into<Strategy>) -> Self
pub fn strategy(self, value: impl Into<Strategy>) -> Self
Sets the strategy field of this struct.
Sourcepub fn steps(self, value: impl Into<Vec<StepValue>>) -> Self
pub fn steps(self, value: impl Into<Vec<StepValue>>) -> Self
Sets the steps field of this struct.
Sourcepub fn secrets(self, value: impl Into<IndexMap<String, Secret>>) -> Self
pub fn secrets(self, value: impl Into<IndexMap<String, Secret>>) -> Self
Sets the secrets field of this struct.
Sourcepub fn retry(self, value: impl Into<RetryStrategy>) -> Self
pub fn retry(self, value: impl Into<RetryStrategy>) -> Self
Sets the retry field of this struct.
Source§impl Job
impl Job
Sourcepub fn new<T: ToString>(name: T) -> Self
pub fn new<T: ToString>(name: T) -> Self
Creates a new Job with the specified name and default settings.
Sourcepub fn add_env<T: Into<Env>>(self, new_env: T) -> Self
pub fn add_env<T: Into<Env>>(self, new_env: T) -> Self
Adds an environment variable to the job.
pub fn add_needs<J: ToString>(self, job_id: J) -> Self
Sourcepub fn add_output<K: ToString, V: ToString>(self, key: K, value: V) -> Self
pub fn add_output<K: ToString, V: ToString>(self, key: K, value: V) -> Self
Adds an output to the job.
Sourcepub fn add_service<K: ToString, V: Into<Container>>(
self,
key: K,
service: V,
) -> Self
pub fn add_service<K: ToString, V: Into<Container>>( self, key: K, service: V, ) -> Self
Adds a service to the job.
Sourcepub fn add_secret<K: ToString, V: Into<Secret>>(self, key: K, secret: V) -> Self
pub fn add_secret<K: ToString, V: Into<Secret>>(self, key: K, secret: V) -> Self
Adds a secret to the job.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Job
impl<'de> Deserialize<'de> for Job
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Job
impl StructuralPartialEq for Job
Auto Trait Implementations§
impl Freeze for Job
impl RefUnwindSafe for Job
impl Send for Job
impl Sync for Job
impl Unpin for Job
impl UnwindSafe for Job
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.