https://github.com/drone-plugins/drone-git-action
Drone plugin to handle Git commands
https://github.com/drone-plugins/drone-git-action
drone drone-plugin
Last synced: 5 months ago
JSON representation
Drone plugin to handle Git commands
- Host: GitHub
- URL: https://github.com/drone-plugins/drone-git-action
- Owner: drone-plugins
- License: apache-2.0
- Created: 2019-06-07T12:05:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T11:40:07.000Z (over 2 years ago)
- Last Synced: 2024-06-20T19:30:20.828Z (almost 2 years ago)
- Topics: drone, drone-plugin
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# drone-git-action
[](http://cloud.drone.io/drone-plugins/drone-git-action)
[](https://gitter.im/drone/drone)
[](https://discourse.drone.io)
[](https://stackoverflow.com/questions/tagged/drone.io)
[](https://microbadger.com/images/plugins/git-action "Get your own image badge on microbadger.com")
[](http://godoc.org/github.com/drone-plugins/drone-git-action)
[](https://goreportcard.com/report/github.com/drone-plugins/drone-git-action)
Drone plugin to handle Git actions like `clone`, `commit` and `push`. For the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/drone-plugins/drone-git-action/).
## Build
Build the binary with the following command:
```console
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on
go build -v -a -tags netgo -o release/linux/amd64/drone-git-action
```
## Docker
Build the Docker image with the following command:
```console
docker build \
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
--file docker/Dockerfile.linux.amd64 --tag plugins/git-action .
```
### Usage
```console
docker run --rm \
-v $(pwd):$(pwd) \
-w $(pwd) \
plugins/git-action
```