Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

maniator/gh

Repository files navigation

Dockerized github cli

Simple container running in alpine Linux to run the github cli seamlessly for use anywhere

Very useful in projects using docker in their CI processes

DockerHub Badge

Github Repo

https://github.com/maniator/gh

Docker image tags

https://hub.docker.com/r/maniator/gh/tags/

Usage

docker run -it --rm -v ${HOME}:/root -v $(pwd):/gh -e GITHUB_TOKEN=<token> maniator/gh <command>

Optional alias:

alias gh="docker run -ti --rm -v ${HOME}:/root -v $(pwd):/gh maniator/gh"

for example, if you need clone this repository, with the alias you just set, you can run it as local command

gh repo clone serveside/gh

Kubernetes usage

apiVersion: apps/v1
kind: Deployment
spec:
 template:
 spec:
 containers:
 - name: containers-images
 image: images-names:v1.0.0
 volumeMounts:
 - name: vc-theme
 mountPath: /opt/themes/custom
 initContainers:
 - name: git
 image: maniator/gh:latest
 env:
 - name: GITHUB_TOKEN
 value: "ghp_xxxxxxxxx"
 command: ["sh", "-c"]
 args: ["gh auth setup-git --hostname github.com && git clone https://github.com/username/theme.git"]
 volumeMounts:
 - name: vc-theme
 mountPath: /gh/theme
 volumes:
 - name: vc-theme
 emptyDir: {}

About

dockerized github cli

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /