1. Registry
  2. Packages
  3. Pulumi Delivery
  4. API Docs
  5. GitHubSource
Viewing docs for Pulumi Delivery v0.2.0
published on Wednesday, Nov 18, 2026 by Pulumi
Pulumi Delivery
Viewing docs for Pulumi Delivery v0.2.0
published on Wednesday, Nov 18, 2026 by Pulumi

    Declares a GitHub repository and branch. Members check out this source. The source locks its commit when the run first creates it, and every stage of the run gets that commit. The commit output holds this commit. It is unknown during registration and preview.

    A source does not start runs unless you set trigger. Set trigger to true to start a run on every push to the branch. Set it to { paths } to start a run only when a push changes a matching file.

    Example Usage

    import * as delivery from "@pulumi/delivery";
    
    const code = new delivery.GitHubSource("code", {
        repository: "acme/shop",
        branch: "main",
        trigger: { paths: ["src/**", "delivery/**"] },
    });
    

    Create GitHubSource Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GitHubSource(name: string, args: GitHubSourceArgs, opts?: ComponentResourceOptions);
    @overload
    def GitHubSource(resource_name: str,
                     args: GitHubSourceArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def GitHubSource(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     branch: Optional[str] = None,
                     repository: Optional[str] = None,
                     trigger: Optional[Union[bool, SourceTriggerArgs]] = None)
    func NewGitHubSource(ctx *Context, name string, args GitHubSourceArgs, opts ...ResourceOption) (*GitHubSource, error)
    public GitHubSource(string name, GitHubSourceArgs args, ComponentResourceOptions? opts = null)
    public GitHubSource(String name, GitHubSourceArgs args)
    public GitHubSource(String name, GitHubSourceArgs args, ComponentResourceOptions options)
    
    type: delivery:GitHubSource
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "delivery_git_hub_source" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args GitHubSourceArgs
    The arguments to resource properties.
    opts ComponentResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args GitHubSourceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args GitHubSourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GitHubSourceArgs
    The arguments to resource properties.
    opts ComponentResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GitHubSourceArgs
    The arguments to resource properties.
    options ComponentResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var gitHubSourceResource = new Delivery.GitHubSource("gitHubSourceResource", new()
    {
        Branch = "string",
        Repository = "string",
        Trigger = false,
    });
    
    example, err := delivery.NewGitHubSource(ctx, "gitHubSourceResource", &delivery.GitHubSourceArgs{
    	Branch:     pulumi.String("string"),
    	Repository: pulumi.String("string"),
    	Trigger:    pulumi.Any(false),
    })
    
    resource "delivery_git_hub_source" "gitHubSourceResource" {
      lifecycle {
        create_before_destroy = true
      }
      branch     = "string"
      repository = "string"
      trigger    = false
    }
    
    var gitHubSourceResource = new GitHubSource("gitHubSourceResource", GitHubSourceArgs.builder()
        .branch("string")
        .repository("string")
        .trigger(false)
        .build());
    
    git_hub_source_resource = delivery.GitHubSource("gitHubSourceResource",
        branch="string",
        repository="string",
        trigger=False)
    
    const gitHubSourceResource = new delivery.GitHubSource("gitHubSourceResource", {
        branch: "string",
        repository: "string",
        trigger: false,
    });
    
    type: delivery:GitHubSource
    properties:
        branch: string
        repository: string
        trigger: false
    

    GitHubSource Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The GitHubSource resource accepts the following input properties:

    Branch string
    Branch of the source.
    Repository string
    Repository of the source. Use owner/repo on GitHub, group/subgroup/repo (the full path) on GitLab, workspace/repo on Bitbucket and org/project/repo on Azure DevOps. Pulumi Cloud picks the integration of the organization whose account (GitHub), group (GitLab), workspace (Bitbucket) or organization and project (Azure DevOps) holds the repository.
    Trigger bool | SourceTrigger
    Starts a run when someone pushes to the branch. Set true for every push, or { paths } for pushes that change a matching file. If you omit it, the source is part of the release but never starts a run.
    Branch string
    Branch of the source.
    Repository string
    Repository of the source. Use owner/repo on GitHub, group/subgroup/repo (the full path) on GitLab, workspace/repo on Bitbucket and org/project/repo on Azure DevOps. Pulumi Cloud picks the integration of the organization whose account (GitHub), group (GitLab), workspace (Bitbucket) or organization and project (Azure DevOps) holds the repository.
    Trigger bool | SourceTriggerArgs
    Starts a run when someone pushes to the branch. Set true for every push, or { paths } for pushes that change a matching file. If you omit it, the source is part of the release but never starts a run.
    branch string
    Branch of the source.
    repository string
    Repository of the source. Use owner/repo on GitHub, group/subgroup/repo (the full path) on GitLab, workspace/repo on Bitbucket and org/project/repo on Azure DevOps. Pulumi Cloud picks the integration of the organization whose account (GitHub), group (GitLab), workspace (Bitbucket) or organization and project (Azure DevOps) holds the repository.
    trigger bool | object
    Starts a run when someone pushes to the branch. Set true for every push, or { paths } for pushes that change a matching file. If you omit it, the source is part of the release but never starts a run.
    branch String
    Branch of the source.
    repository String
    Repository of the source. Use owner/repo on GitHub, group/subgroup/repo (the full path) on GitLab, workspace/repo on Bitbucket and org/project/repo on Azure DevOps. Pulumi Cloud picks the integration of the organization whose account (GitHub), group (GitLab), workspace (Bitbucket) or organization and project (Azure DevOps) holds the repository.
    trigger Boolean | SourceTrigger
    Starts a run when someone pushes to the branch. Set true for every push, or { paths } for pushes that change a matching file. If you omit it, the source is part of the release but never starts a run.
    branch string
    Branch of the source.
    repository string
    Repository of the source. Use owner/repo on GitHub, group/subgroup/repo (the full path) on GitLab, workspace/repo on Bitbucket and org/project/repo on Azure DevOps. Pulumi Cloud picks the integration of the organization whose account (GitHub), group (GitLab), workspace (Bitbucket) or organization and project (Azure DevOps) holds the repository.
    trigger boolean | SourceTrigger
    Starts a run when someone pushes to the branch. Set true for every push, or { paths } for pushes that change a matching file. If you omit it, the source is part of the release but never starts a run.
    branch str
    Branch of the source.
    repository str
    Repository of the source. Use owner/repo on GitHub, group/subgroup/repo (the full path) on GitLab, workspace/repo on Bitbucket and org/project/repo on Azure DevOps. Pulumi Cloud picks the integration of the organization whose account (GitHub), group (GitLab), workspace (Bitbucket) or organization and project (Azure DevOps) holds the repository.
    trigger bool | SourceTriggerArgs
    Starts a run when someone pushes to the branch. Set true for every push, or { paths } for pushes that change a matching file. If you omit it, the source is part of the release but never starts a run.
    branch String
    Branch of the source.
    repository String
    Repository of the source. Use owner/repo on GitHub, group/subgroup/repo (the full path) on GitLab, workspace/repo on Bitbucket and org/project/repo on Azure DevOps. Pulumi Cloud picks the integration of the organization whose account (GitHub), group (GitLab), workspace (Bitbucket) or organization and project (Azure DevOps) holds the repository.
    trigger Boolean | Property Map
    Starts a run when someone pushes to the branch. Set true for every push, or { paths } for pushes that change a matching file. If you omit it, the source is part of the release but never starts a run.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GitHubSource resource produces the following output properties:

    Commit string
    Commit of the run for this source. It is unknown during registration and preview.
    Commit string
    Commit of the run for this source. It is unknown during registration and preview.
    commit string
    Commit of the run for this source. It is unknown during registration and preview.
    commit String
    Commit of the run for this source. It is unknown during registration and preview.
    commit string
    Commit of the run for this source. It is unknown during registration and preview.
    commit str
    Commit of the run for this source. It is unknown during registration and preview.
    commit String
    Commit of the run for this source. It is unknown during registration and preview.

    Supporting Types

    SourceTrigger, SourceTriggerArgs

    Limits the pushes that start a run.
    Paths List<string>
    Glob patterns of changed files. A push starts a run only when it changes a file that matches one of them.
    Paths []string
    Glob patterns of changed files. A push starts a run only when it changes a file that matches one of them.
    paths list(string)
    Glob patterns of changed files. A push starts a run only when it changes a file that matches one of them.
    paths List<String>
    Glob patterns of changed files. A push starts a run only when it changes a file that matches one of them.
    paths string[]
    Glob patterns of changed files. A push starts a run only when it changes a file that matches one of them.
    paths Sequence[str]
    Glob patterns of changed files. A push starts a run only when it changes a file that matches one of them.
    paths List<String>
    Glob patterns of changed files. A push starts a run only when it changes a file that matches one of them.

    Package Details

    Repository
    delivery pulumi/pulumi-delivery
    License
    Apache-2.0
    Pulumi Delivery
    Viewing docs for Pulumi Delivery v0.2.0
    published on Wednesday, Nov 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial