Skip to content

Latest commit

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Docker Image & GitHub Action for gitman

gitman documentation can be found at https://github.com/jacebrowning/gitman

If you need to use gitman in a CI/CD pipeline, you can use the GitHub Action provided in this repository. For local use, to manage gitman dependencies, you can use the Docker image provided in this repository.

GitHub Action

Inputs

OptionDefault ValueDescription
quietfalseOnly display errors (and prompts)
verbosefalseEnable verbose logging
root-dirDirectory relative to the repository root, where the dependencies are installed
depthLimit the number of dependency levels
no-scriptsfalseSkip running scripts after install

Example Usage

- name: Install Dependenciesuses: redmatter/github-action-gitman@mainwith:
root-dir: 'vendor'

Docker Image

The docker image can be built using the command below.

docker build -t redmatter/gitman .

How to use it?

When managing dependencies with gitman, you need to set up a gitman.yml file in your project. Once you have added the dependencies to the gitman.yml file, you can run the gitman command to manage the dependencies.

When using the docker image to manage gitman dependencies, you can run the gitman command by mounting the project directory as a volume.

The use of the docker image in this way can lead to file permission issues. You can avoid this by using the --user option to run the container with the same privileges as your user. This way, the files created by gitman will be owned by you. A typical form of the --user option is --user="$(id -u):$(id -g)".

See a typical command below, which initializes the gitman dependencies. You can replace init with any other gitman command.

docker run --rm -it \
--user="$(id -u):$(id -g)" \
--volume="$(pwd):/project" \
redmatter/gitman \
init

Environment Variable

For advanced use cases, you can set the following environment variables to configure the behavior of the docker image.

NameDefault ValueDescription
PROJECT_DIR/projectDirectory within the container used as the project directory (root).
GITMAN_CACHE/tmpDirectory within the container used by gitman for caching Git repositories.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

6 watching

Forks

Releases

Packages

Contributors

Languages