2021-06-09 02:35:42 +02:00
|
|
|
---
|
|
|
|
sidebar_label: git
|
|
|
|
---
|
|
|
|
|
2021-06-23 16:31:42 +02:00
|
|
|
# alpha.dagger.io/git
|
2021-06-09 02:35:42 +02:00
|
|
|
|
2021-06-15 10:48:54 +02:00
|
|
|
Git operations
|
|
|
|
|
2021-06-16 12:14:39 +02:00
|
|
|
```cue
|
2021-06-23 16:31:42 +02:00
|
|
|
import "alpha.dagger.io/git"
|
2021-06-16 12:14:39 +02:00
|
|
|
```
|
|
|
|
|
2021-09-01 18:49:21 +02:00
|
|
|
## git.#Commit
|
|
|
|
|
2021-09-02 14:23:57 +02:00
|
|
|
Commit & push to git repository
|
2021-09-01 18:49:21 +02:00
|
|
|
|
|
|
|
### git.#Commit Inputs
|
|
|
|
|
2021-12-16 23:37:55 +01:00
|
|
|
| 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 |
|
2021-09-01 18:49:21 +02:00
|
|
|
|
|
|
|
### git.#Commit Outputs
|
|
|
|
|
|
|
|
| Name | Type | Description |
|
|
|
|
| ------------- |:-------------: |:-------------: |
|
|
|
|
|*hash* | `string` |Commit hash |
|
|
|
|
|
2021-06-16 12:14:39 +02:00
|
|
|
## git.#CurrentBranch
|
2021-06-09 02:35:42 +02:00
|
|
|
|
|
|
|
Get the name of the current checked out branch or tag
|
|
|
|
|
2021-06-16 12:14:39 +02:00
|
|
|
### git.#CurrentBranch Inputs
|
2021-06-09 02:35:42 +02:00
|
|
|
|
|
|
|
| Name | Type | Description |
|
|
|
|
| ------------- |:-------------: |:-------------: |
|
2021-06-15 10:48:54 +02:00
|
|
|
|*repository* | `dagger.#Artifact` |Git repository |
|
2021-06-09 02:35:42 +02:00
|
|
|
|
2021-06-16 12:14:39 +02:00
|
|
|
### git.#CurrentBranch Outputs
|
2021-06-09 02:35:42 +02:00
|
|
|
|
|
|
|
| Name | Type | Description |
|
|
|
|
| ------------- |:-------------: |:-------------: |
|
2021-06-15 10:48:54 +02:00
|
|
|
|*name* | `string` |Git branch name |
|
2021-06-09 02:35:42 +02:00
|
|
|
|
2021-09-01 18:49:21 +02:00
|
|
|
## git.#Image
|
|
|
|
|
|
|
|
### git.#Image Inputs
|
|
|
|
|
|
|
|
_No input._
|
|
|
|
|
|
|
|
### git.#Image Outputs
|
|
|
|
|
|
|
|
_No output._
|
|
|
|
|
2021-06-16 12:14:39 +02:00
|
|
|
## git.#Repository
|
2021-06-09 02:35:42 +02:00
|
|
|
|
|
|
|
A git repository
|
|
|
|
|
2021-06-16 12:14:39 +02:00
|
|
|
### git.#Repository Inputs
|
2021-06-09 02:35:42 +02:00
|
|
|
|
2021-09-01 18:49:21 +02:00
|
|
|
| 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 |
|
2021-12-16 23:37:55 +01:00
|
|
|
|*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 |
|
2021-06-09 02:35:42 +02:00
|
|
|
|
2021-06-16 12:14:39 +02:00
|
|
|
### git.#Repository Outputs
|
2021-06-09 02:35:42 +02:00
|
|
|
|
|
|
|
_No output._
|
|
|
|
|
2021-06-16 12:14:39 +02:00
|
|
|
## git.#Tags
|
2021-06-09 02:35:42 +02:00
|
|
|
|
|
|
|
List tags of a repository
|
|
|
|
|
2021-06-16 12:14:39 +02:00
|
|
|
### git.#Tags Inputs
|
2021-06-09 02:35:42 +02:00
|
|
|
|
|
|
|
| Name | Type | Description |
|
|
|
|
| ------------- |:-------------: |:-------------: |
|
2021-06-15 10:48:54 +02:00
|
|
|
|*repository* | `dagger.#Artifact` |Git repository |
|
2021-06-09 02:35:42 +02:00
|
|
|
|
2021-06-16 12:14:39 +02:00
|
|
|
### git.#Tags Outputs
|
2021-06-09 02:35:42 +02:00
|
|
|
|
|
|
|
| Name | Type | Description |
|
|
|
|
| ------------- |:-------------: |:-------------: |
|
2022-01-10 21:05:25 +01:00
|
|
|
|*tags* | `[...string]` |Repository tags |
|