Sign inSign up

wenonly/github-sync

By wenonly

•Updated almost 2 years ago

使用 docker 定时同步 github 源码到 nas 中,每天凌晨 1 点同步

Image
0

373

wenonly/github-sync repository overview

⁠github-sync

使用 docker 定时同步 github 源码到 nas 中,每天凌晨 1 点同步

github地址:https://github.com/wenonly/github-sync⁠

⁠使用

docker run -d --name github-sync \
  -e GITHUB_TOKEN=你的GitHub令牌 \
  -e GITHUB_USER=你的GitHub用户名 \
  -v /path/to/local/data:/app/data \
  github-sync

⁠环境变量配置

环境变量描述默认值
GITHUB_TOKENGitHub 个人访问令牌无
GITHUB_USERGitHub 用户名无
RUN_TIME每日同步时间01:00:00
TZ时区Asia/Shanghai
SMTP_SERVERSMTP 服务器地址smtp.qq.com
SMTP_PORTSMTP 服务器端口587
SMTP_USERNAMESMTP 用户名无
SMTP_PASSWORDSMTP 密码无
EMAIL_SENDER发件人邮箱地址无
EMAIL_RECEIVER收件人邮箱地址无

⁠注意事项

  • 需要设置 GITHUB_TOKEN 和 GITHUB_USER 环境变量
  • 需要挂载一个本地目录到容器中的/app/data 目录

⁠编译

docker build -t github-sync .

如果需要编译多平台,使用下面的命令

docker buildx build --platform linux/amd64,linux/arm64 -t github-sync:latest .

Tag summary

Content type

Image

Digest

sha256:dae63a186…

Size

95.1 MB

Last updated

almost 2 years ago

docker pull wenonly/github-sync