Skip to main content

alpha.dagger.io/git

Git operations

import "alpha.dagger.io/git"

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.#Repository

A git repository

git.#Repository Inputs

NameTypeDescription
remotestringGit remote. Example: "https://github.com/dagger/dagger"
refstringGit ref: can be a commit, tag or branch. Example: "main"
subdir*null \| string(optional) Subdirectory
authTokendagger.#Secret(optional) Add Personal Access Token
authHeaderdagger.#Secret(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[]Repository tags