Skip to content

bxb100/action-upload

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

📤 :octocat:

File Uploader

A GitHub Action for uploading files to S3/FTP/WebDAV and more, powered by Apache OpenDAL

All Parameters

Input Description Default
provider The uploader name -
provider_options Newline-delimited list of the uploader options
using key=value format
-
include Newline-delimited list of the glob pattern 1 -
flatten flatten the upload path false

🐾 You can learn more about multi-line YAML syntax here

Providers

Memory (for test)

build-test

- name: Upload to memory
  uses: bxb100/action-upload@main
  with:
    provider: memory
    include: '__tests__/**'

WebDAV

test-webdav

Options

OpenDAL WebDAV

Name Description Default Other
endpoint WebDAV endpoint - -
username WebDAV username - -
password WebDAV password - -
token WebDAV bearer token - -
root WebDAV root path - MUST be the format like /abc/def/
- name: Upload to WebDAV
  uses: bxb100/action-upload@main
  with:
    provider: webdav
    provider_options: |
      endpoint=${{ secrets.WEBDAV_ENDPOINT }}
      username=${{ secrets.WEBDAV_USERNAME }}
      password=${{ secrets.WEBDAV_PASSWORD }}
      root=/test/
    include: '__tests__/**'

S3

test-s3

Aws S3 and compatible services (including minio, digitalocean space and so on) support.

Options

OpenDAL S3

  • root: Set the work dir for backend.
  • bucket: Set the container name for backend.
  • endpoint: Set the endpoint for backend.
  • region: Set the region for backend.
  • access_key_id: Set the access_key_id for backend.
  • secret_access_key: Set the secret_access_key for backend.
  • security_token: Set the security_token for backend.
  • server_side_encryption: Set the server_side_encryption for backend.
  • server_side_encryption_aws_kms_key_id: Set the server_side_encryption_aws_kms_key_id for backend.
  • server_side_encryption_customer_algorithm: Set the server_side_encryption_customer_algorithm for backend.
  • server_side_encryption_customer_key: Set the server_side_encryption_customer_key for backend.
  • server_side_encryption_customer_key_md5: Set the server_side_encryption_customer_key_md5 for backend.
  • disable_config_load: Disable aws config load from env
  • enable_virtual_host_style: Enable virtual host style.
- name: Upload to S3
  uses: bxb100/action-upload@main
  with:
    provider: s3
    provider_options: |
      root=/cs
      bucket=action-upload-test
      region=auto
      endpoint=https://${{secrets.CLOUDFLARE_R2_ACCOUNTID}}.r2.cloudflarestorage.com
      access_key_id=${{secrets.CLOUDFLARE_R2_KEY}}
      secret_access_key=${{secrets.CLOUDFLARE_R2_SECRET}}
    include: '__tests__/**'

Azblob

Azure Storage Blob services support.

Options

OpenDAL Azblob

  • root: Set the work dir for backend.
  • container: Set the container name for backend.
  • endpoint: Set the endpoint for backend.
  • account_name: Set the account_name for backend.
  • account_key: Set the account_key for backend.

Footnotes

  1. https://github.com/actions/toolkit/tree/main/packages/glob