refac: project

This commit is contained in:
2023-10-01 18:54:37 +02:00
parent 39d233b3d9
commit d6adb0e2e3
37 changed files with 1106 additions and 1146 deletions

View File

@ -1,25 +1,34 @@
# drone-git
# git-docker
Drone plugin to clone `git` repositories.
This is a fork of the official project to clone git repositories from a SCM
control system like github, gitlab, gitea, gogs and so on. The difference
between the origin and this fork is that this project supports ARM and the shell
scripts are tested against shellchecker.
Among other things, the project experiences more extensive support, as the
project receives continuous updates thanks to renovate.
## Build
Build the Docker image with the following commands:
The container image can be build with via `make` and requires `docker` or
`podman`.
```
docker build --rm -f docker/Dockerfile.linux.amd64 -t drone/git .
```bash
make container-image/build CONTAINER_RUNTIME=docker # or
make container-image/build CONTAINER_RUNTIME=podman
```
## Usage
Clone a commit:
```
docker run --rm \
-e DRONE_WORKSPACE=/drone \
-e DRONE_REMOTE_URL=https://github.com/drone/envsubst.git \
-e DRONE_BUILD_EVENT=push \
-e DRONE_COMMIT_SHA=15e3f9b7e16332eee3bbdff9ef31f95d23c5da2c \
-e DRONE_COMMIT_BRANCH=master \
drone/git
```bash
podman run \
--rm \
--env DRONE_BUILD_EVENT=push \
--env DRONE_COMMIT_SHA=39d233b3d9eccc68e66508a06a725a2567f33143 \
--env DRONE_REMOTE_URL=https://git.cryptic.systems/volker.raschek/git-docker.git \
--env DRONE_WORKSPACE=/workspace \
--volume /tmp/workspace:/workspace \
volker.raschek/git:latest
```