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. (Nested mappings are not allowed in compact mappings.)
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 source:sourcepath dest:destpath
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
You can specify the version you want. By default, this action downloads the latest version.
steps:
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
with:
rclone_config: ${{ secrets.RCLONE_CONFIG }}
version: v1.61.0
This action automatically uses a GitHub token in order to authenticate with GitHub API and avoid rate limiting. You can also specify your own read-only fine-grained personal access token.
steps:
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
with:
rclone_config: ${{ secrets.RCLONE_CONFIG }}
token: ${{ secrets.GH_PAT }}