Class Step.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.github.workflows.Step.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stepbuild()Builds the configured instance.Step.Builderenv(Map<String,String> env)Sets the value ofStepConfiguration.getEnv()Step.Builderid(String id)Sets the value ofStepConfiguration.getId()Step.BuilderifValue(String ifValue)Sets the value ofStepConfiguration.getIfValue()Step.Buildername(String name)Sets the value ofStepConfiguration.getName()Step.Builderrun(String run)Sets the value ofStep.getRun()Step.Builderuses(String uses)Sets the value ofStep.getUses()Step.Builderwith(Map<String,? extends Object> with)Sets the value ofStep.getWith()Step.BuilderworkingDirectory(String workingDirectory)Sets the value ofStepConfiguration.getWorkingDirectory()
-
-
-
Method Detail
-
run
@Stability(Experimental) public Step.Builder run(String run)
Sets the value ofStep.getRun()- Parameters:
run- Runs command-line programs using the operating system's shell. If you do not provide a name, the step name will default to the text specified in the run command.- Returns:
this
-
uses
@Stability(Experimental) public Step.Builder uses(String uses)
Sets the value ofStep.getUses()- Parameters:
uses- Selects an action to run as part of a step in your job. An action is a reusable unit of code. You can use an action defined in the same repository as the workflow, a public repository, or in a published Docker container image.- Returns:
this
-
with
@Stability(Experimental) public Step.Builder with(Map<String,? extends Object> with)
Sets the value ofStep.getWith()- Parameters:
with- A map of the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as environment variables. The variable is prefixed with INPUT_ and converted to upper case.- Returns:
this
-
env
@Stability(Experimental) public Step.Builder env(Map<String,String> env)
Sets the value ofStepConfiguration.getEnv()- Parameters:
env- Sets environment variables for steps to use in the runner environment. You can also set environment variables for the entire workflow or a job.- Returns:
this
-
id
@Stability(Experimental) public Step.Builder id(String id)
Sets the value ofStepConfiguration.getId()- Parameters:
id- A unique identifier for the step. You can use the id to reference the step in contexts.- Returns:
this
-
ifValue
@Stability(Experimental) public Step.Builder ifValue(String ifValue)
Sets the value ofStepConfiguration.getIfValue()- Parameters:
ifValue- You can use the if conditional to prevent a job from running unless a condition is met. You can use any supported context and expression to create a conditional.- Returns:
this
-
name
@Stability(Experimental) public Step.Builder name(String name)
Sets the value ofStepConfiguration.getName()- Parameters:
name- A name for your step to display on GitHub.- Returns:
this
-
workingDirectory
@Stability(Experimental) public Step.Builder workingDirectory(String workingDirectory)
Sets the value ofStepConfiguration.getWorkingDirectory()- Parameters:
workingDirectory- Specifies a working directory for a step. Overrides a job's working directory.- Returns:
this
-
build
@Stability(Experimental) public Step build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<Step>- Returns:
- a new instance of
Step - Throws:
NullPointerException- if any required attribute was not provided
-
-