Skip to main content

alpha.dagger.io/git

Git operations

import "alpha.dagger.io/git"

git.#Commit

Commit & push to git repository

git.#Commit Inputs

NameTypeDescription
repository.remotestringRepository remote URL
repository.authToken*null \| {\n $dagger: {\n secret: {}\n }\n}Authentication token (PAT or password)
repository.branchstringGit branch
namestringUsername
emailstringEmail
messagestringCommit message
force*false \| boolForce push options

git.#Commit Outputs

NameTypeDescription
hashstringCommit hash

git.#CurrentBranch

Get the name of the current checked out branch or tag

git.#CurrentBranch Inputs

NameTypeDescription
repositorydagger.#ArtifactGit repository

git.#CurrentBranch Outputs

NameTypeDescription
namestringGit branch name

git.#Image

git.#Image Inputs

No input.

git.#Image Outputs

No output.

git.#Repository

A git repository

git.#Repository Inputs

NameTypeDescription
remotestringGit remote link
refstringGit ref: can be a commit, tag or branch. Example: "main"
subdir*null \| string(optional) Subdirectory
authToken*null \| {\n $dagger: {\n secret: {}\n }\n}(optional) Add Personal Access Token
authHeader*null \| {\n $dagger: {\n secret: {}\n }\n}(optional) Add OAuth Token

git.#Repository Outputs

No output.

git.#Tags

List tags of a repository

git.#Tags Inputs

NameTypeDescription
repositorydagger.#ArtifactGit repository

git.#Tags Outputs

NameTypeDescription
tags[...string]Repository tags