Dagger
Search

gh

GitHub CLI

Installation

dagger install github.com/sagikazarmark/daggerverse/gh@9a3074edb9cb21746ea2f9dcdd018d520b47f2e6

Entrypoint

Return Type
Gh !
Arguments
NameTypeDescription
versionString GitHub CLI version. (default: latest version)
tokenSecret GitHub token.
repoString GitHub repository (e.g. "owner/repo").
Example
dagger -m github.com/sagikazarmark/daggerverse/gh@9a3074edb9cb21746ea2f9dcdd018d520b47f2e6 call \
func (m *myModule) example() *Gh  {
	return dag.
			Gh()
}
@function
def example() -> dag.Gh:
	return (
		dag.gh()
	)
@func()
example(): Gh {
	return dag
		.gh()
}

Types

Gh 🔗

release() 🔗

Manage releases.

Return Type
Release !
Example
dagger -m github.com/sagikazarmark/daggerverse/gh@9a3074edb9cb21746ea2f9dcdd018d520b47f2e6 call \
 release
func (m *myModule) example() *GhRelease  {
	return dag.
			Gh().
			Release()
}
@function
def example() -> dag.GhRelease:
	return (
		dag.gh()
		.release()
	)
@func()
example(): GhRelease {
	return dag
		.gh()
		.release()
}

run() 🔗

Run a GitHub CLI command (accepts a single command string without “gh”).

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
cmdString !-Command to run.
tokenSecret -GitHub token.
repoString -GitHub repository (e.g. "owner/repo").
Example
dagger -m github.com/sagikazarmark/daggerverse/gh@9a3074edb9cb21746ea2f9dcdd018d520b47f2e6 call \
 run --cmd string
func (m *myModule) example(cmd string) *Container  {
	return dag.
			Gh().
			Run(cmd)
}
@function
def example(cmd: str) -> dagger.Container:
	return (
		dag.gh()
		.run(cmd)
	)
@func()
example(cmd: string): Container {
	return dag
		.gh()
		.run(cmd)
}

exec() 🔗

Run a GitHub CLI command (accepts a list of arguments without “gh”).

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
args[String ! ] !-Arguments to pass to GitHub CLI.
tokenSecret -GitHub token.
repoString -GitHub repository (e.g. "owner/repo").
Example
dagger -m github.com/sagikazarmark/daggerverse/gh@9a3074edb9cb21746ea2f9dcdd018d520b47f2e6 call \
 exec --args string1 --args string2
func (m *myModule) example(args []string) *Container  {
	return dag.
			Gh().
			Exec(args)
}
@function
def example(args: List[str]) -> dagger.Container:
	return (
		dag.gh()
		.exec(args)
	)
@func()
example(args: string[]): Container {
	return dag
		.gh()
		.exec(args)
}

get() 🔗

Get the GitHub CLI binary.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
versionString -GitHub CLI version. (default: latest version)
tokenSecret -GitHub token. (May be used to get the latest version from the GitHub API)
Example
dagger -m github.com/sagikazarmark/daggerverse/gh@9a3074edb9cb21746ea2f9dcdd018d520b47f2e6 call \
 get
func (m *myModule) example() *File  {
	return dag.
			Gh().
			Get()
}
@function
def example() -> dagger.File:
	return (
		dag.gh()
		.get()
	)
@func()
example(): File {
	return dag
		.gh()
		.get()
}

Release 🔗

create() 🔗

Create a new GitHub Release for a repository.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
tagString !-Tag this release should point to or create.
titleString !-Release title.
files[File ! ] -Release assets to upload.
draftBoolean -Save the release as a draft instead of publishing it.
preReleaseBoolean -Mark the release as a prerelease.
targetString -Target branch or full commit SHA (default: main branch).
notesString -Release notes.
notesFileFile -Read release notes from file.
discussionCategoryString -Start a discussion in the specified category.
generateNotesBoolean -Automatically generate title and notes for the release.
notesStartTagString -Tag to use as the starting point for generating release notes.
latestBoolean -Mark this release as "Latest" (default: automatic based on date and version).
verifyTagBoolean -Abort in case the git tag doesn't already exist in the remote repository.
notesFromTagBoolean -Tag to use as the starting point for generating release notes.
tokenSecret -GitHub token.
repoString -GitHub repository (e.g. "owner/repo").
Example
dagger -m github.com/sagikazarmark/daggerverse/gh@9a3074edb9cb21746ea2f9dcdd018d520b47f2e6 call \
 release \
 create --tag string --title string
func (m *myModule) example(tag string, title string) *Container  {
	return dag.
			Gh().
			Release().
			Create(tag, title)
}
@function
def example(tag: str, title: str) -> dagger.Container:
	return (
		dag.gh()
		.release()
		.create(tag, title)
	)
@func()
example(tag: string, title: string): Container {
	return dag
		.gh()
		.release()
		.create(tag, title)
}