Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
archive

GitHub Action

R2 Upload

v0.0.6

R2 Upload

archive

R2 Upload

Upload a file to CloudFlare R2 bucket

Installation

Copy and paste the following snippet into your .yml file.

              

- name: R2 Upload

uses: gemwalletcom/r2-upload@v0.0.6

Learn more about this action in gemwalletcom/r2-upload

Choose a version

r2-upload action

This action uploads a file to Cloudflare R2

Inputs

endpoint

Required The R2 endpoint URL. Example: https://<accountid>.r2.cloudflarestorage.com

access_key_id

Required The R2 Access Key ID.

secret_access_key

Required The R2 Access Key.

bucket

Required The R2 bucket you want to upload to.

file

Required Which file you want to upload

destination

Optional Where you want the file to end up. Defaults to '/(filename)'.

Example usage

- name: Upload file to R2
  uses: magicwallet/r2-upload@main
  with:
    endpoint: ${{ secrets.R2_ENDPOINT }}
    access_key_id: ${{ secrets.R2_ACCESS_KEY_ID }}
    secret_access_key: ${{ secrets.R2_ACCESS_SECRET_KEY }}
    bucket: ${{ secrets.R2_BUCKET }}
    file: ./index.html
    destination: '/public'