Auto-sync fork is a GitHub Actions workflow that automatically syncs your public fork with the upstream repository.
- Go to repository settings
- Select Secrets and variables → Actions
- Add new secrets with name
- PERSONAL_TOKEN: your GitHub account token/GitHub organization token, not repository token. example:
ghp_xxxxxxxxxxxxxxxxxxxxx
- PERSONAL_TOKEN: your GitHub account token/GitHub organization token, not repository token. example:
- Add new variables with name
- YOUR_USERNAME_OR_ORGANIZATION_NAME: your username or organization name. example:
paulpham157
- YOUR_USERNAME_OR_ORGANIZATION_NAME: your username or organization name. example:
Note Cronjob will run every Sunday at 00:00, you can change it in file
.github/workflows/sync.yml
- Install Node.js
- Install dependencies
- Copy
.env.example
to.env
and fill in the values - Run script
npm start
- Make the process run in background
- Make a cron job on your own local machine to run every hour/day/week...
-
Create a new Telegram bot via @BotFather
-
Get the bot token from @BotFather
-
Get your chat ID by:
- Send a message to your bot
- Visit: https://api.telegram.org/botTELEGRAM_BOT_TOKEN/getUpdates on browser. Example: https://api.telegram.org/bot123:ABCDEF/getUpdates
- Find your chat ID in the response
-
Add secrets in GitHub repository:
- TELEGRAM_BOT_TOKEN: Your bot token. example:
123:ABCDEF
- TELEGRAM_CHAT_ID: Your chat ID. example:
1234567890
- TELEGRAM_BOT_TOKEN: Your bot token. example:
- Click the sponsor button on auto-sync-fork repository on GitHub