Giter Site home page Giter Site logo

upload_github_artifacts_to_gdrive's Introduction

Upload Github Artifacts TO GDrive

Github Action To Upload Artifacts to Google Drive Using A Google Drive Api.

Usage

Simple example:

steps:
    - uses: actions/[email protected]

    - name: Upload Artifacts TO Google Drive
      uses: Jumbo810/[email protected]
      with:
        target: <LOCAL_PATH_TO_YOUR_FILE>
        credentials: ${{ secrets.<YOUR_SERVICE_ACCOUNT_CREDENTIALS> }}
        parent_folder_id: <YOUR_DRIVE_FOLDER_ID>

Inputs

target (Required):

Local path to the file to upload, can be relative from github runner current directory.

You can also specify a glob pattern to upload multiple files at once (this will cause the name property to be ignored).

credentials (Required):

A service account public/private key pair encoded in base64.

Generate and download your credentials in JSON format

Run base64 my_service_account_key.json > encoded.txt and paste the encoded string into a github secret.

parent_folder_id (Required):

The id of the drive folder where you want to upload your file. It is the string of characters after the last / when browsing to your folder URL. You must share the folder with the service account (using its email address) unless you specify a owner.

name (Optional):

The name of the file to be uploaded. Set to the target filename if not specified. (Ignored if target contains a glob * or **)

child_folder (Optional):

A sub-folder where to upload your file. It will be created if non-existent and must remain unique. Useful to organize your drive like so:

πŸ“‚ Release // parent folder
 ┃
 ┣ πŸ“‚ v1.0 // child folder
 ┃ β”— πŸ“œ uploaded_file_v1.0
 ┃
 ┣ πŸ“‚ v2.0 // child folder
 ┃ β”— πŸ“œ uploaded_file_v2.0

owner (Optional):

The email address of a user account that has access to the drive folder and will get the ownership of the file after its creation. To use this feature you must grant your service account a domain-wide delegation of authority beforehand.

override (Optional):

If set true, delete files with the same name before uploading.

upload_github_artifacts_to_gdrive's People

Contributors

jumbo810 avatar aquacash5 avatar ashotjanibekyan avatar amitie10g avatar

Stargazers

Octopus avatar Érico Porto avatar Stephanie Nadeau avatar Răzvan Gheorghe avatar Weijland avatar Vincent Lee avatar Revelator avatar  avatar Derrick Croteau avatar

Watchers

 avatar

upload_github_artifacts_to_gdrive's Issues

Target glob path

Upload multiple files using a glob path.

Example

- name: Archive results
  uses: Jumbo810/[email protected]
  with:
    credentials: ${{ secrets.credentials }}
    target: "temp/*"
    parent_folder_id: ${{ secrets.parent_folder_id }}

General download URL

Is it possible to auto-generate the file's URL to be used in further steps ? Like I would like to email or post the URL in our discord server (using a diff action ofc) to auto-release our builds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.