Automate file downloads (torrents & direct links) using GitHub Actions and upload them to cloud storage via Rclone.
- Automated Downloads: Triggers on push to
downloads.txt. - Multi-Protocol Support: Handles HTTP/HTTPS direct links and Torrents/Magnets via
aria2c. - Streaming Sites: Supports 1000+ sites via
yt-dlp(YouTube, Vimeo, Dailymotion, etc.). - Cloud Upload: Automatically uploads finished downloads to any Rclone-supported cloud storage (Google Drive, Mega, OneDrive, etc.).
- Smart Processing:
- Deduplicates failed links automatically.
- Moves successful links to
completed.txt. - Tracks failed links in
failed.txt.
- Secure: Prevents argument injection and handles file operations safely.
Install Rclone on your machine and run rclone config to set up your remote storage. verify it works.
Get the content of your config file (usually ~/.config/rclone/rclone.conf or C:\Users\<User>\.config\rclone\rclone.conf).
Go to Settings > Secrets and variables > Actions in your repository and add:
| Secret Name | Value |
|---|---|
RCLONE_CONF |
The entire content of your rclone.conf file. |
The script defaults to using a remote named remote. If your remote in rclone.conf has a different name (e.g., mega, gdrive), set it as an Environment Variable in .github/workflows/main.yml:
env:
RCLONE_REMOTE: mega- Add Links: Open
downloads.txtand paste your links (one per line).https://example.com/file.zip magnet:?xt=urn:btih:EXAMPLE... https://youtube.com/watch?v=... https://vimeo.com/... - Commit & Push:
git add downloads.txt git commit -m "Add new downloads" git push - Monitor: Go to the Actions tab to see progress.
- Result:
- Files uploaded to your cloud storage.
downloads.txtcleared.completed.txtupdated.
- Torrents: Seeding is disabled (
--seed-time=0) to save resources. - Large Files: GitHub Actions has storage limits (~14GB disk space). For larger files, consider using a self-hosted runner.
- Blob URLs: Blob URLs (
blob:https://...) cannot be downloaded directly. Open the video in a browser, open Developer Tools (F12) → Network tab, find the actual source file (.mp4,.m3u8, or manifest URL), and add that URL instead.