Skip to content

gazbertxbot/Teslamate

Repository files navigation

Teslamate

This action download file from Google Drive. It's simple and secure.

For instructions on how to set up service account required to download file, see How to create a project, service account and generate authentication key section

Examples

- name: Download file X from Google Drive to default (./) directory
  uses: k0staa/executable@v1
  with:
    service-account-auth-json: ${{ secrets.SERVICE_ACCOUNT_AUTH_JSON }}
    download-file-name: bmw.jpg
- name: Download file X from Google Drive to ./out/ directory
  uses: k0staa/executable@v1
  with:
    service-account-auth-json: ${{ secrets.SERVICE_ACCOUNT_AUTH_JSON }}
    download-file-name: bmw.jpg
    download-to: ./out/

Inputs

  • service-account-key-json Required The credentials key of the service account that is allowed to download file from Google Drive account.

  • download-file-name Required File name of the file that should be downloaded.

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

  • export-media-type optional mime type which allows to export Google Workspace documents. Supported mime types can be found here. Examples: application/vnd.openxmlformats-officedocument.wordprocessingml.document(docx), application/pdf, text/plain, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (xlsx), application/vnd.openxmlformats-officedocument.presentationml.presentation (pptx), image/jpeg.

How to create a project, service account and generate authentication key

  1. Create a project in the Google Cloud Platform Console . See instructions
  2. Enable Google Drive API in new project. See instructions
  3. Create a service account for new project. See instructions
  4. Create authentication keys for the service account and download it as json file. See instructions
  5. Share the file that you want to download to the service account. See instructions

Contribution

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

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

Roadmap

  • Support batch download
  • Support file download using file_id
  • Support file download from provided folder name

Known issues

  • If you share two files with the same name (different folders), the first one found will be downloaded.

Contributors

Thanks for all your support! (emoji key):

Mitchell Douglass
Mitchell Douglass

💻

License

Check LICENSE.md file.

About

Teslamate K8s configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published