A collection of tools to automate some activities at Github:
- gh-mirror: A tool to mirror Github repositories to Gitea
- gh-starred: A tool to clone starred repositories with x-motemen/ghq
You can use docker to mirror Github repositories to Gitea:
docker run --rm -e GITHUB_USERNAME="changeme" \
-e GITHUB_TOKEN="changeme" \
-e GITEA_URL="changeme" \
-e GITEA_TOKEN="changeme" \
--name=gh-mirror \
ghcr.io/brighteyed/gh-mirror:latest
To update Github token execute update_token.py
:
docker run --rm -v "/path/to/gitea/data/git/repositories:/repositories" ghcr.io/brighteyed/gh-mirror:latest update_token.py --old-token="<old_token>" --new-token="<new_token>"
You can use docker to clone or update starred repositories:
docker run --rm -e GITHUB_TOKEN="changeme" \
-v /path/to/dir:/ghq \
--name=gh-starred \
ghcr.io/brighteyed/gh-starred:latest
GITHUB_USERNAME
– Github account nameGITHUB_TOKEN
– Github token to access repositoriesGITEA_URL
– Gitea URLGITEA_TOKEN
– Gitea user token to access via API