https://github.com/danielfrg/github-archive
The simplest script to make an archive of a Github user/org
https://github.com/danielfrg/github-archive
Last synced: 5 months ago
JSON representation
The simplest script to make an archive of a Github user/org
- Host: GitHub
- URL: https://github.com/danielfrg/github-archive
- Owner: danielfrg
- License: apache-2.0
- Created: 2023-09-10T19:00:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-20T22:18:20.000Z (almost 2 years ago)
- Last Synced: 2025-02-25T01:50:24.950Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 44.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-archive
The simplest script to make an archive of all repos in a Github user/org.
Depends on: `gh` and `jq`.
- [one file script](./backup.sh)
- [docker image](https://github.com/danielfrg/github-archive/pkgs/container/github-archive)
- Auth using a Github Personal Access Token (PAT)
- [kubernetes cronjob template](k8s/cronjob.yml)
- [Github Action template](./.github/workflows/demo-archive.yml)
See the `backup.sh` and `Dockerfile` files for variables.
I use this to run a daily backup on my homelab.
## Usage
Local:
```console
./backup.sh
```
Docker:
```console
export GH_TOKEN=...
docker run -it --rm -e GH_TOKEN=$GH_TOKEN -v $PWD/data:/data ghcr.io/danielfrg/github-archive:main
```