Skip to content

Upload file from internet to Google Drive using GitHub Actions

License

Notifications You must be signed in to change notification settings

njkevlani/driveload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

driveload

Upload file from internet to Google Drive using GitHub Actions

Usage

For uploading a file to Google Drive, make a commit in this repository with following command:

git commit --allow-empty -m "driveload: example.com/path/to/file/url/thing.txt file_name.txt"

This commit message is parsed as: driveload: file_url file_name

File on given url is saved in Google Drive in driveload folder with file_name as name.

Example commit:

git commit --allow-empty -m "driveload: https://speed.hetzner.de/1GB.bin test_file_1GB.bin"

Setup

1. Setup Google Drive client on your local machine. This will be used later. Follow this: https://github.com/odeke-em/drive

2. Setup GitHub Repository with this action

  • Fork / Copy this repo in your GitHub account
  • From your Google Drive client folder (which you must have got in step 1), copy content of .gd/credentials.json file.
  • Add this copied josn as secret in your fork repo with name DRIVE_CRED. Enclose this json with single quoat ('), like '{"client_id": "...", "client_secret": "...", "refresh_token": "..."}'

Credits

About

Upload file from internet to Google Drive using GitHub Actions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages