pub struct Workflow {
pub name: Option<String>,
pub env: Option<Env>,
pub run_name: Option<String>,
pub on: Option<Event>,
pub permissions: Option<Permissions>,
pub jobs: Option<Jobs>,
pub concurrency: Option<Concurrency>,
pub defaults: Option<Defaults>,
pub secrets: Option<IndexMap<String, Secret>>,
pub timeout_minutes: Option<u32>,
}
Expand description
Represents the configuration for a GitHub workflow.
A workflow is a configurable automated process made up of one or more jobs. This struct defines the properties that can be set in a workflow YAML file for GitHub Actions, including the name, environment variables, permissions, jobs, concurrency settings, and more.
Fields§
§name: Option<String>
The name of the workflow. GitHub displays the names of your workflows under your repository’s “Actions” tab.
env: Option<Env>
Environment variables that can be used in the workflow.
run_name: Option<String>
The name for workflow runs generated from the workflow. GitHub displays the workflow run name in the list of workflow runs.
on: Option<Event>
The event that triggers the workflow. This can include events like
push
, pull_request
, etc.
permissions: Option<Permissions>
Permissions granted to the GITHUB_TOKEN
for the workflow.
jobs: Option<Jobs>
The jobs that are defined in the workflow.
concurrency: Option<Concurrency>
Concurrency settings for the workflow, allowing control over how jobs are executed.
defaults: Option<Defaults>
Default settings for jobs in the workflow.
secrets: Option<IndexMap<String, Secret>>
Secrets that can be used in the workflow, such as tokens or passwords.
timeout_minutes: Option<u32>
The maximum number of minutes a job can run before it is canceled.
Implementations§
Source§impl Workflow
impl Workflow
Sourcepub fn run_name(self, value: impl Into<String>) -> Self
pub fn run_name(self, value: impl Into<String>) -> Self
Sets the run_name
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 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 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 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 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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Workflow
impl<'de> Deserialize<'de> for Workflow
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>,
Auto Trait Implementations§
impl Freeze for Workflow
impl RefUnwindSafe for Workflow
impl Send for Workflow
impl Sync for Workflow
impl Unpin for Workflow
impl UnwindSafe for Workflow
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)