This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/docs/reference/git.md
Andrea Luzzardi f7de4500a4 docs: update auto-generated docs
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2022-01-11 11:38:22 -08:00

94 lines
3.2 KiB
Markdown

---
sidebar_label: git
---
# alpha.dagger.io/git
Git operations
```cue
import "alpha.dagger.io/git"
```
## git.#Commit
Commit & push to git repository
### git.#Commit Inputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*repository.remote* | `string` |Repository remote URL |
|*repository.authToken* | `*null \| {\n $dagger: {\n secret: {}\n }\n}` |Authentication token (PAT or password) |
|*repository.branch* | `string` |Git branch |
|*name* | `string` |Username |
|*email* | `string` |Email |
|*message* | `string` |Commit message |
|*force* | `*false \| bool` |Force push options |
### git.#Commit Outputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*hash* | `string` |Commit hash |
## git.#CurrentBranch
Get the name of the current checked out branch or tag
### git.#CurrentBranch Inputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*repository* | `dagger.#Artifact` |Git repository |
### git.#CurrentBranch Outputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*name* | `string` |Git branch name |
## git.#Image
### git.#Image Inputs
_No input._
### git.#Image Outputs
_No output._
## git.#Repository
A git repository
### git.#Repository Inputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*remote* | `string` |Git remote link |
|*ref* | `string` |Git 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
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*repository* | `dagger.#Artifact` |Git repository |
### git.#Tags Outputs
| Name | Type | Description |
| ------------- |:-------------: |:-------------: |
|*tags* | `[...string]` |Repository tags |