Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maniator/gh
dockerized github cli
https://github.com/maniator/gh
gh github-cli
Last synced: 11 days ago
JSON representation
dockerized github cli
- Host: GitHub
- URL: https://github.com/maniator/gh
- Owner: maniator
- License: mit
- Created: 2021-05-21T20:22:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-14T00:37:23.000Z (8 months ago)
- Last Synced: 2024-05-14T01:43:17.650Z (8 months ago)
- Topics: gh, github-cli
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/maniator/gh
- Size: 36.1 KB
- Stars: 13
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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](http://dockeri.co/image/maniator/gh)](https://hub.docker.com/r/maniator/gh/)
### Github Repo
https://github.com/maniator/gh
### Docker image tags
https://hub.docker.com/r/maniator/gh/tags/
### Usage
```shell
docker run -it --rm -v ${HOME}:/root -v $(pwd):/gh -e GITHUB_TOKEN= maniator/gh
```### 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
```yaml
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: {}
```