/rclone

Wraps the rclone CLI to be used in Github Actions

Primary LanguageDockerfile

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