github_release

Use this data source to retrieve information about a GitHub release in a specific repository.

Example Usage

To retrieve the latest release that is present in a repository:

data "github_release" "example" {
    repository  = "example-repository"
    owner       = "example-owner"
    retrieve_by = "latest"
}

To retrieve a specific release from a repository based on it's ID:

data "github_release" "example" {
    repository  = "example-repository"
    owner       = "example-owner"
    retrieve_by = "id"
    id          = 12345
}

Finally, to retrieve a release based on it's tag:

data "github_release" "example" {
    repository  = "example-repository"
    owner       = "example-owner"
    retrieve_by = "tag"
    release_tag = "v1.0.0"
}

Argument Reference

Attributes Reference