Class GithubWorkflow
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- io.github.cdklabs.projen.Component
-
- io.github.cdklabs.projen.github.GithubWorkflow
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
TaskWorkflow
@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-03-28T21:16:43.083Z") @Stability(Experimental) public class GithubWorkflow extends Component
(experimental) Workflow for GitHub.A workflow is a configurable automated process made up of one or more jobs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGithubWorkflow.Builder(experimental) A fluent builder forGithubWorkflow.
-
Constructor Summary
Constructors Modifier Constructor Description GithubWorkflow(GitHub github, String name)GithubWorkflow(GitHub github, String name, GithubWorkflowOptions options)protectedGithubWorkflow(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedGithubWorkflow(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddJob(String id, Object job)(experimental) Adds a single job to the workflow.voidaddJobs(Map<String,Object> jobs)(experimental) Add jobs to the workflow.StringgetConcurrency()(experimental) Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time.YamlFilegetFile()(experimental) The workflow YAML file.ObjectgetJob(String id)(experimental) Get a single job from the workflow.StringgetName()(experimental) The name of the workflow.GithubCredentialsgetProjenCredentials()(experimental) GitHub API authentication method used by projen workflows.StringgetRunName()(experimental) The name for workflow runs generated from the workflow.voidon(Triggers events)(experimental) Add events to triggers the workflow.voidremoveJob(String id)(experimental) Removes a single job to the workflow.voidsetRunName(String value)(experimental) The name for workflow runs generated from the workflow.voidupdateJob(String id, Object job)(experimental) Updates a single job to the workflow.voidupdateJobs(Map<String,Object> jobs)(experimental) Updates jobs for this worklow Does a complete replace, it does not try to merge the jobs.-
Methods inherited from class io.github.cdklabs.projen.Component
getProject, isComponent, postSynthesize, preSynthesize, synthesize
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
GithubWorkflow
protected GithubWorkflow(software.amazon.jsii.JsiiObjectRef objRef)
-
GithubWorkflow
protected GithubWorkflow(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
GithubWorkflow
@Stability(Experimental) public GithubWorkflow(@NotNull GitHub github, @NotNull String name, @Nullable GithubWorkflowOptions options)- Parameters:
github- This parameter is required.name- This parameter is required.options-
-
-
Method Detail
-
addJob
@Stability(Experimental) public void addJob(@NotNull String id, @NotNull Object job)(experimental) Adds a single job to the workflow.- Parameters:
id- The job name (unique within the workflow). This parameter is required.job- The job specification. This parameter is required.
-
addJobs
@Stability(Experimental) public void addJobs(@NotNull Map<String,Object> jobs)(experimental) Add jobs to the workflow.- Parameters:
jobs- Jobs to add. This parameter is required.
-
getJob
@Stability(Experimental) @NotNull public Object getJob(@NotNull String id)
(experimental) Get a single job from the workflow.- Parameters:
id- The job name (unique within the workflow). This parameter is required.
-
on
@Stability(Experimental) public void on(@NotNull Triggers events)(experimental) Add events to triggers the workflow.- Parameters:
events- The event(s) to trigger the workflow. This parameter is required.
-
removeJob
@Stability(Experimental) public void removeJob(@NotNull String id)(experimental) Removes a single job to the workflow.- Parameters:
id- The job name (unique within the workflow). This parameter is required.
-
updateJob
@Stability(Experimental) public void updateJob(@NotNull String id, @NotNull Object job)(experimental) Updates a single job to the workflow.- Parameters:
id- The job name (unique within the workflow). This parameter is required.job- This parameter is required.
-
updateJobs
@Stability(Experimental) public void updateJobs(@NotNull Map<String,Object> jobs)(experimental) Updates jobs for this worklow Does a complete replace, it does not try to merge the jobs.- Parameters:
jobs- Jobs to update. This parameter is required.
-
getName
@Stability(Experimental) @NotNull public String getName()
(experimental) The name of the workflow.
-
getProjenCredentials
@Stability(Experimental) @NotNull public GithubCredentials getProjenCredentials()
(experimental) GitHub API authentication method used by projen workflows.
-
getConcurrency
@Stability(Experimental) @Nullable public String getConcurrency()
(experimental) Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time.Default: disabled
-
getFile
@Stability(Experimental) @Nullable public YamlFile getFile()
(experimental) The workflow YAML file.May not exist if
workflowsEnabledis false onGitHub.
-
getRunName
@Stability(Experimental) @Nullable public String getRunName()
(experimental) The name for workflow runs generated from the workflow.GitHub displays the workflow run name in the list of workflow runs on your repository's "Actions" tab. If
run-nameis omitted or is only whitespace, then the run name is set to event-specific information for the workflow run. For example, for a workflow triggered by apushorpull_requestevent, it is set as the commit message.This value can include expressions and can reference
githubandinputscontexts.
-
setRunName
@Stability(Experimental) public void setRunName(@Nullable String value)(experimental) The name for workflow runs generated from the workflow.GitHub displays the workflow run name in the list of workflow runs on your repository's "Actions" tab. If
run-nameis omitted or is only whitespace, then the run name is set to event-specific information for the workflow run. For example, for a workflow triggered by apushorpull_requestevent, it is set as the commit message.This value can include expressions and can reference
githubandinputscontexts.
-
-