Setup Rclone on GitHub Actions to use rclone
.
This action installs Rclone for use in actions by installing it on tool cache using AnimMouse/tool-cache.
This action is implemented as a composite action.
To use rclone
, run this action before rclone
.
Encode the rclone.conf file in base64 using this command base64 -w 0 rclone.conf
and paste it to RCLONE_CONFIG
secret.
steps:
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
with:
rclone_config: ${{ secrets.RCLONE_CONFIG }}
- run: rclone copy source:sourcepath dest:destpath
For bare remote with exposed colon, use single quotes to prevent the YAML parser from the ambiguity of colon.
steps:
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
with:
rclone_config: ${{ secrets.RCLONE_CONFIG }}
- run: 'rclone copy source: dest:'
steps:
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
with:
rclone_config: ${{ secrets.RCLONE_CONFIG }}
- run: |
rclone copy source:sourcepath dest:destpath
rclone copy source: dest:
For bare remote with exposed colon, no need to use single quotes.
Paste your Rclone config pass to RCLONE_CONFIG_PASS
secret.
steps:
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
with:
rclone_config: ${{ secrets.RCLONE_CONFIG }}
- run: rclone copy source1:sourcepath1 dest1:destpath1
env:
RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASS }}
You can use Rclone without a config file by using command line options or environment variables.
steps:
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
- run: 'rclone lsd --http-url https://beta.rclone.org :http:'
- run: 'rclone lsd :http:'
env:
RCLONE_HTTP_URL: https://beta.rclone.org