pub struct GitHubActions;Expand description
GitHub Actions cloud-build integration.
Implementations§
Source§impl GitHubActions
impl GitHubActions
Sourcepub fn format_variable(name: &str, value: &str) -> String
pub fn format_variable(name: &str, value: &str) -> String
Formats an assignment for the UTF-8 GITHUB_ENV environment file.
Single-line values use name=value. Multiline values use GitHub’s heredoc
syntax with a unique delimiter, and their line endings are normalized to LF.
Sourcepub fn append_variable(
environment_file_path: impl AsRef<Path>,
name: &str,
value: Option<&str>,
) -> Result<()>
pub fn append_variable( environment_file_path: impl AsRef<Path>, name: &str, value: Option<&str>, ) -> Result<()>
Atomically appends an assignment to a GitHub Actions environment file.
An exclusive file lock covers the seek and complete write so parallel build processes cannot overwrite or interleave assignments. UTF-8 is written without a byte-order mark. An unterminated pre-existing line is terminated.
Trait Implementations§
Source§impl CloudBuild for GitHubActions
impl CloudBuild for GitHubActions
Source§fn is_applicable(&self) -> bool
fn is_applicable(&self) -> bool
Returns whether this provider recognizes the current environment.
Source§fn is_pull_request(&self) -> bool
fn is_pull_request(&self) -> bool
Returns whether the current build validates a pull request.
Source§fn building_branch(&self) -> Option<String>
fn building_branch(&self) -> Option<String>
Returns the fully qualified branch ref being built, when known.
Source§fn building_tag(&self) -> Option<String>
fn building_tag(&self) -> Option<String>
Returns the fully qualified tag ref being built, when known.
Source§fn git_commit_id(&self) -> Option<String>
fn git_commit_id(&self) -> Option<String>
Returns the Git commit ID being built, when supplied by the provider.
Source§fn set_cloud_build_number(
&self,
_build_number: &str,
_stdout: &mut dyn Write,
_stderr: &mut dyn Write,
) -> Result<EnvironmentVariables>
fn set_cloud_build_number( &self, _build_number: &str, _stdout: &mut dyn Write, _stderr: &mut dyn Write, ) -> Result<EnvironmentVariables>
Updates the provider’s build number and returns environment changes for the caller.
Source§fn set_cloud_build_variable(
&self,
name: &str,
value: &str,
_stdout: &mut dyn Write,
_stderr: &mut dyn Write,
) -> Result<EnvironmentVariables>
fn set_cloud_build_variable( &self, name: &str, value: &str, _stdout: &mut dyn Write, _stderr: &mut dyn Write, ) -> Result<EnvironmentVariables>
Sets a provider variable and returns environment changes for the caller.
Auto Trait Implementations§
impl Freeze for GitHubActions
impl RefUnwindSafe for GitHubActions
impl Send for GitHubActions
impl Sync for GitHubActions
impl Unpin for GitHubActions
impl UnsafeUnpin for GitHubActions
impl UnwindSafe for GitHubActions
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
Mutably borrows from an owned value. Read more