Class GithubWorkflow

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  GithubWorkflow.Builder
      (experimental) A fluent builder for GithubWorkflow.
      • Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

        software.amazon.jsii.JsiiObject.InitializationMode
      • Nested classes/interfaces inherited from interface software.constructs.IConstruct

        software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
    • 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 -
      • GithubWorkflow

        @Stability(Experimental)
        public GithubWorkflow​(@NotNull
                              GitHub github,
                              @NotNull
                              String name)
        Parameters:
        github - This parameter is required.
        name - This parameter is required.
    • 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 workflowsEnabled is false on GitHub.

      • 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-name is 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 a push or pull_request event, it is set as the commit message.

        This value can include expressions and can reference github and inputs contexts.

      • 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-name is 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 a push or pull_request event, it is set as the commit message.

        This value can include expressions and can reference github and inputs contexts.