Skip to content
/ rclone Public

Wraps the rclone CLI to be used in Github Actions

Notifications You must be signed in to change notification settings

wei/rclone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Github Action for rclone

This Action wraps rclone to enable syncing files and directories to and from different cloud storage providers.

Features

  • "rsync for cloud storage"
  • sync to and from different cloud storage providers
  • backup files or deploy artifacts to remote storage

Usage

Github Actions

on: push
jobs:
  rclone:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: rclone
      uses: wei/rclone@v1
      env:
        RCLONE_CONF: ${{ secrets.RCLONE_CONF }}
      with:
        args: copy <source>:<source_path> <dest>:<dest_path>

RCLONE_CONF can be omitted if CLI arguments or environment variables are supplied. RCLONE_CONF can also be encrypted if RCLONE_CONFIG_PASS secret is supplied.

Docker

docker run --rm -e "RCLONE_CONF=$(cat ~/.config/rclone/rclone.conf)" $(docker build -q .) \
  copy <source>:<source_path> <dest>:<dest_path>

Author

Wei He github@weispot.com

License

MIT