HUB
Sign inSign up
git logo

swaleio/git

By swaleio

•Updated 4 days ago

Git with LFS and non-interactive token auth for Swale workflows. Backs the git-clone task.

Image
0

868

swaleio/git repository overview

⁠git

Swale-built image backing the git-clone task definition. It wraps git with Git LFS and non-interactive HTTPS token authentication, and emits the resolved commit SHA as a task output.

  • Base: alpine/git, whose tag is the Git version
  • Installed: git, git-lfs, openssh-client, ca-certificates
  • User: non-root swale (uid 1000)
  • WORKDIR /mnt/workspace, ENTRYPOINT ["/opt/git/entrypoint.sh"]

⁠Invocation

The task definition's exec.args are the git command line (e.g. ["clone", "--depth=1", "${{inputs.repository_url}}", "${{inputs.dest}}"]). The entrypoint runs git "$@" and augments it from these inputs:

Input envEffect
INPUT_GIT_TOKENConfigures HTTPS credential storage so a private repo can be cloned over https://oauth2:<token>@host. Pass a secret.
INPUT_REPOSITORY_URLUsed to derive the credential host, and as the remote when INPUT_REVISION is a commit SHA.
INPUT_DESTThe full consumer-supplied clone path; used to locate the repo when emitting the commit_sha output, and as the repository path when INPUT_REVISION is a commit SHA.
INPUT_REVISIONWhen set and the command is clone, a branch or tag is passed to the clone as --branch. A full 40-character commit SHA, which --branch refuses, is fetched at depth 1 into INPUT_DEST and checked out detached instead.

⁠Output

After a successful clone, the entrypoint appends

commit_sha=<resolved HEAD SHA>

to $WORKFLOW_TASK_OUTPUT.

⁠Tags

Each tag is the version of Git the image packages, such as 2.54.0. A rebuild that keeps that version, to pick up a fixed base image or wrapper, adds -r1, -r2, and so on. A tag is never reused; latest follows the newest publish.

⁠Building

From the repository root:

docker build -t swaleio/git:dev images/git

Merging a change under images/git publishes the image under its next tag; task definitions reference it by digest.


Built from images/git⁠ in the swaleio/task-definitions⁠ repository. For how a task definition references an image, see the task definition reference⁠ in the Swale documentation⁠.

The Dockerfile and entrypoint are covered by the MIT License⁠. Git is GPL-2.0-only and Git LFS is MIT-licensed.

This image also contains software from other projects, each under its own license: apk list -I inside the image names every package with its version and license. Source code for its GPL and LGPL components, Git among them: build files at https://gitlab.alpinelinux.org/alpine/aports⁠ and upstream sources at https://distfiles.alpinelinux.org/⁠. We also provide that source code on request: see Third-party software⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:2ebfc63b5…
Size
36 MB
Last updated
4 days ago
docker pull swaleio/git:latest