✨ RCLONE AUTO REFRESH TOKEN 
- This repo will help to check your remotes’ storage / list album of GGPhotos to refresh the tokens
- When you don’t use your remote for a time, its token is expired itself
- This repo keeps your remotes’ tokens alive, not to be expired
- Automatically run using Github Action on Cron Schedule
Default: Runs at 00:00, every 4 days of the week
TABLE OF CONTENTS
📃 HOW TO USE
1️⃣ HAVE YOUR OWN REPO
- Fork this repo
- If you want to make your repo private, then choose Use this template to Create a new repository
2️⃣ CREATE RCLONE.CONF
OPTION 1: Edit directly
Should use only for private repo
- Create a file name
rclone.conf
- Fill in
rclone.conf
which you created in the previous step
OPTION 2: Use secret
- Create action secret
- Name:
RCLONE_CONFIG_FILE
Value: Fill in the raw link of rlcone.conf
file
You can make the raw link from gist
3️⃣ SELECT REMOTES TO REFRESH TOKENS
If you don’t do this step, it will automatically extract all your remotes (Yes including combine, shared drive which may cause the job to fail). Skip this step if you ensure that all of your remotes are suppported by the script.
Ex of `rclone.conf`
```rclone.conf
[Gugu drai] <-- Take note of this remote name
type = drive
scope = drive
token = {...}
...
```
Content format:
```REMOTES.txt
Gugu drai
1Drai
...
GGPhotosMain
Oops
```
Note: Don’t keep any line break, don’t keep space at the end of each line 🥴
OPTION 1: Edit directly
- Create a file name
REMOTES.txt
- Enter the content in the file
REMOTES.txt
you created in the previous step
OPTION 2: Use either Secret or Variable
- Create action secret/variable
- Name:
REMOTES
Value: Fill in either the content or raw link
If you fill in both, secret will rewrite variable
4️⃣ SET FEATURE ON / OFF (optional)
Go to your Refresh Token.yml
file and edit lines in env:
NAME OF VARIABLE |
DESCRIPTION |
HOW TO USE |
DEFAULT VALUE |
PRINT_LOG |
After the running the script, it will print out the log to Github Action log |
Set value in Refresh Token.yml file |
false |
TELEGRAM |
Send the log as message to your Telegram |
Set value in Refresh Token.yml file |
false |
5️⃣ SETUP SEND LOG TO TELEGRAM (optional)
- Ensure that you have set
TELEGRAM
in Refresh Token.yml
to True
to enable this
- Create 2 secrets:
- Name:
TELGRAM_TO
Value: The id of your group or user
- Name:
TELGRAM_TOKEN
Value: Your bot token (take it from Bot Father)
🏃♂️ RUN
The workflow will automatically run when you do either:
- Run itself on cron schedule, you can edit it in
Refresh Token.yml
- Trigger from action tab (workflow dispatch)
- Star/Restar the repo ⭐
📝 NOTES
- See
Delete old workflows runs.yml
to auto delete workflow runs
- This repo will cache the Rclone, save up time to setup Rclone
If you face any error or want to update newer Rclone version, delete the old cache cache-rclone
in Actions tab → Management → Caches
- I’ve just tested
GoogleDrive
, OneDrive
, Mega
, Dropbox
, GGPhotos
. Others I haven’t tested yet.
- Not support
Shared Google Drive
and Combine
- If you face any error, create an issue and type in the full log of the failed step > Don’t forget to censore your personal information in the log