:outbox_tray: :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)
- name: Upload to memory
uses: bxb100/action-upload@main
with:
provider: memory
include: '__tests__/**'
WebDAV
Options
[OpenDAL WebDAV](https://docs.rs/opendal/latest/opendal/services/struct.Webdav.html)
| 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
Aws S3 and compatible services (including minio, digitalocean space and so on) support.
Options
[OpenDAL S3](https://docs.rs/opendal/latest/opendal/services/struct.S3.html)
- `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](https://docs.rs/opendal/latest/opendal/services/struct.Azblob.html)
- `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.