Coder Social home page Coder Social logo

vishal-deriv / r2-upload-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ryand56/r2-upload-action

0.0 0.0 0.0 8.38 MB

GitHub Action to upload files or directories to a Cloudflare R2 bucket (or another S3 compatible API), built on top of @aws-sdk/client-s3 in TypeScript.

License: MIT License

TypeScript 100.00%

r2-upload-action's Introduction

R2 Upload Action

GitHub Action to upload files to a Cloudflare R2 bucket, built on top of @aws-sdk/client-s3 in TypeScript.
Combination of these two repos: S3 Upload Action and Cloudflare R2 Upload.

Usage

Basic Usage

- uses: ryand56/r2-upload-action@latest
  with:
    r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
    r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
    r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
    r2-bucket: ${{ secrets.R2_BUCKET }}
    source-dir: src
    destination-dir: ./

In this example, source-dir is stored in the root of the bucket. Change destination-dir input to specify the location of where the directory will be uploaded.

Custom Usage

- uses: ryand56/r2-upload-action@latest # Can be any release
  with:
    r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
    r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
    r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
    r2-bucket: ${{ secrets.R2_BUCKET }}
    source-dir: src
    destination-dir: artifacts # Can be anything as long as it is an actual path
    output-file-url: 'true' # defaults to true

See the latest action.yml for every input and output or take a look below.

Inputs

Name Description Default
r2-account-id (Required) Your Cloudflare account ID. N/A
r2-access-key-id (Required) Your Cloudflare R2 bucket access key ID. N/A
r2-secret-access-key (Required) Your Cloudflare R2 bucket secret access key. N/A
r2-bucket (Required) Your Cloudflare R2 bucket name. N/A
source-dir (Required) The directory to upload to the Cloudflare R2 bucket. N/A
destination-dir (Optional) The destination to upload the directory to in the Cloudflare R2 bucket. Empty string

Outputs

Name Description
result Result of this action. Either success or failure is set.
file-urls The URLs of the uploaded files in the directory.

Contributing

See the contributing guide for more detail on how to implement something into the project.

r2-upload-action's People

Contributors

dependabot[bot] avatar ryand56 avatar r2-action-bot[bot] avatar renovate[bot] avatar hudsongraeme avatar lixeon 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.