All Projects → satackey → Action Google Drive

satackey / Action Google Drive

Licence: apache-2.0
GitHub Action to interact with Google Drive

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Action Google Drive

cottoncandy
sugar for s3
Stars: ✭ 33 (-19.51%)
Mutual labels:  google-drive, cloud-storage
Cloud Media Scripts
Upload and stream media from the cloud with or without encryption. Cache all new and recently streamed media locally to access quickly and reduce API calls
Stars: ✭ 84 (+104.88%)
Mutual labels:  cloud-storage, google-drive
Homescripts
My Scripts for Plex / Emby with Google Drive and rclone
Stars: ✭ 652 (+1490.24%)
Mutual labels:  cloud-storage, google-drive
Cloudcross
CloudCross it's opensource crossplatform software for syncronization a local files and folders with many cloud providers. On this moment a Cloud Mail.Ru, Yandex.Disk, Google drive, OneDrive and Dropbox support is available
Stars: ✭ 185 (+351.22%)
Mutual labels:  cloud-storage, google-drive
go-drive
A simple cloud drive mapping web app supports local, FTP/SFTP, S3, OneDrive, WebDAV, Google Drive.
Stars: ✭ 184 (+348.78%)
Mutual labels:  google-drive, cloud-storage
rclone-drive
☁️Simple web cloud storage based on rclone, transform cloud storage (s3, google drive, one drive, dropbox) into own custom web-based storage
Stars: ✭ 30 (-26.83%)
Mutual labels:  google-drive, cloud-storage
Rclone
"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Files
Stars: ✭ 30,541 (+74390.24%)
Mutual labels:  cloud-storage, google-drive
Zpan
A self-hosted cloud disk base on the cloud storage./ 一个基于云存储的网盘系统,用于自建私人网盘或企业网盘。
Stars: ✭ 765 (+1765.85%)
Mutual labels:  cloud-storage
Multipart Related
MIME multipart/related as defined in RFC 2387
Stars: ✭ 10 (-75.61%)
Mutual labels:  google-drive
Webclient
The mega.nz web client
Stars: ✭ 723 (+1663.41%)
Mutual labels:  cloud-storage
Packtpub Crawler
Download your daily free Packt Publishing eBook https://www.packtpub.com/packt/offers/free-learning
Stars: ✭ 717 (+1648.78%)
Mutual labels:  google-drive
Googlesheets
Google Spreadsheets R API
Stars: ✭ 771 (+1780.49%)
Mutual labels:  google-drive
Openly Rails
"GitHub" for Google Drive [inactive]
Stars: ✭ 20 (-51.22%)
Mutual labels:  google-drive
Gdown.pl
Google Drive direct download of big files
Stars: ✭ 735 (+1692.68%)
Mutual labels:  google-drive
Sdk
MEGA C++ SDK
Stars: ✭ 980 (+2290.24%)
Mutual labels:  cloud-storage
Elodie
An EXIF-based photo assistant, organizer, manager and workflow automation tool.
Stars: ✭ 840 (+1948.78%)
Mutual labels:  google-drive
Minio Hs
MinIO Client SDK for Haskell
Stars: ✭ 39 (-4.88%)
Mutual labels:  cloud-storage
Gdown
Download a large file from Google Drive (curl/wget fails because of the security notice).
Stars: ✭ 962 (+2246.34%)
Mutual labels:  google-drive
Drivebackupv2
Uploads Minecraft backups to Google Drive/OneDrive or by (S)FTP
Stars: ✭ 26 (-36.59%)
Mutual labels:  google-drive
Forge View.googledrive.models
View models from Google Drive: Sample Viewer application that displays files of supported formats from Google Drive, and generates them in the Viewer
Stars: ✭ 18 (-56.1%)
Mutual labels:  google-drive

Interact with Google Drive

This action uploads/downloads files to/from Google Drive

Example

Upload

- name: Upload to Google Drive
  uses: satackey/[email protected]
  with:
    skicka-tokencache-json: ${{ secrets.SKICKA_TOKENCACHE_JSON }}
    upload-from: ./
    upload-to: /path/to/upload

    # For those who set up Google Drive API client ID and secret themselves
    google-client-id: ${{ secrets.GOOGLE_CLIENT_ID }}
    google-client-secret: ${{ secrets.GOOGLE_CLIENT_SECRET }}

Donwload

- name: Download from Google Drive
  uses: satackey/[email protected]
  with:
    skicka-tokencache-json: ${{ secrets.SKICKA_TOKENCACHE_JSON }}
    download-from: /path/to/download
    download-to: ./

    # For those who set up Google Drive API client ID and secret themselves
    google-client-id: ${{ secrets.GOOGLE_CLIENT_ID }}
    google-client-secret: ${{ secrets.GOOGLE_CLIENT_SECRET }}

Get ready

This action uses skicka for uploading to Google Drive. You need to generate token and register it with GitHub secrets.

How to generate token

Users already using skicka

In your GitHub repository → Settings → Secrets, register by entering SKICKA_TOKENCACHE_JSON for name and the content of ~/.skicka.tokencache.json for value.

Users who have never used skicka

  1. Setup Docker and execute following command.

    docker run --rm -it --entrypoint "" satackey/skicka sh -c "skicka -no-browser-auth ls && cat /root/.skicka.tokencache.json"
    
  2. Access the URL showed in the output

  3. Grant access, paste code showed in the browser into the terminal.

  4. In your GitHub repository → Settings → Secrets, register by entering SKICKA_TOKENCACHE_JSON for name and the content of ~/.skicka.tokencache.json for value.

    {"ClientId":"xxx-xxxxx.apps.googleusercontent.com","access_token":"xxxx.xx-xxxxxxxxx","token_type":"Bearer","refresh_token":"x//xxxxxxx-xxxxxxx","expiry":"2020-01-03T06:11:01.3298117Z"}
    
Troubleshooting of sign in

As of Jan. 2, 2020, for the accounts that sign in to skicka for the first time, may have a problem of being displayed as Sign in with Google temporarily disabled for this app. The workaround is to set up the Google Drive API client ID and secret, and set them in skicka.

Follow this article (japanese only) to set up a client ID and secret. See translated by Google

Replace xxxx-your-google-client-id-xx.googleusercontent.com and xxx_yourGoogleClientSecret_xxxx, run the following command.

$ docker run -e GOOGLE_CLIENT_ID=xxxx-your-google-client-id-xx.googleusercontent.com -e GOOGLE_CLIENT_SECRET=xxx_yourGoogleClientSecret_xxxx --rm -it --entrypoint "ash" satackey/skicka

When the container starts, run the following command.

# sed -i -e "s/;clientid=YOUR_GOOGLE_APP_CLIENT_ID/clientid=$GOOGLE_CLIENT_ID/" ~/.skicka.config && sed -i -e "s/;clientsecret=YOUR_GOOGLE_APP_SECRET/clientsecret=$GOOGLE_CLIENT_SECRET/" ~/.skicka.config && skicka -no-browser-auth ls && cat /root/.skicka.tokencache.json

Return to step 2 and proceed, and similarly register your client ID and secret to the GitHub secret.

Inputs

  • skicka-tokencache-json Required
    The credentials of the account to upload, generated by skicka. (Contents of ~/.skicka.tokencache.json)

  • upload-from optional
    Upload source path. Default is the current directory.

  • upload-to Required for upload
    Upload destination path.

  • download-from Required for download
    Download source path.

  • download-to optional
    Download destination path. Default is the current directory.

  • google-client-id optional
    OAuth2.0 client ID of Google APIs when using skicka.
    Required for those who set up Google Drive API client ID and secret themselves. (Same for google-client-secret below)

  • google-client-secret optional
    OAuth2.0 Client Secret of Google APIs when using skicka.

  • remove-outdated optional, default: 'true'
    Whether to delete files that are not local but exist on Google Drive, either 'true' or 'false'

    Note: It is recommended to turn it off when performing operations involving large files, because it detects files that do not exist locally and downloads them.

Contribution

PRs are accepted. Contributions to the roadmap are also welcome!

If you are having trouble or feature request, post new issue.

Roadmap

  • Support Windows / macOS runner (#9)
  • Embedded skicka metadata caching
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].