Code Monkey home page Code Monkey logo

gdrive-upload-action's Introduction

Google Drive Upload Action

GitHub Super-Linter CI Check dist/ CodeQL Coverage

This project has been bootstrapped with GitHub Action TypeScript template.

GitHub Action that uploads files to Google Drive.

Usage

Inputs

Name Description Required
credentials Google API credentials in base64 format. true
parent-folder-id The parent folder ID in Google Drive. true
source-filepath The path of the local file to upload. true
target-filepath The remote file path in Google Drive of the uploaded file relative to the given parent folder. Use parent folder root with source filename when not set. false
overwrite Overwrite remote file on Google Drive if it does already exist. false (default: true)
create-checksum Create and upload a sha-256 checksum file next to the uploaded file. false (default: false)

Outputs

Name Description
file-id The ID of the uploaded file.

Examples

steps:
  - name: Checkout
    id: checkout
    uses: actions/checkout@v4

  - name: Create dummy file
    run: |
      mkdir -p output/files
      echo 'Hello World' > output/files/hello.txt

  - name: Upload file to Google Drive
    id: gdrive-upload
    uses: bonitasoft/gdrive-upload-action@v1
    with:
      credentials: ${{ secrets.GDRIVE_CREDENTIALS }} # credentials stored as a GitHub secret
      parent-folder-id: ${{ vars.GDRIVE_FOLDER_ID }} # folder id stored as a GitHub variable
      source-filepath: output/files/hello.txt
      target-filepath: test/hello_1.txt
      overwrite: true
      create-checksum: true

  - name: Print Output
    id: output
    run: echo "${{ steps.gdrive-upload.outputs.file-id }}"

gdrive-upload-action's People

Contributors

rbioteau avatar dependabot[bot] avatar akantcheff avatar

Watchers

 avatar  avatar emmanuel.duchastenier@bonitasoft.com avatar  avatar  avatar  avatar Pablo avatar Mickael Vallet avatar danila_mazour avatar Bishal Thapaliya avatar  avatar

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.