Skip to content

Rclone (rclone@v1)

Run portable copy, sync, check, list, or storage-management workflows across rclone-supported backends.

  • Repository: dagucloud/rclone
  • Runtime owned by the action: rclone/rclone@v1.74.1 and nodejs/node@v22.21.1 through action tools

Contributions are welcome. The repository is public, so improvements, bug reports, and pull requests can go to dagucloud/rclone.

Example

yaml
steps:
  - id: list_files
    action: rclone@v1
    with:
      command: lsf
      source: /data/input

  - id: print
    run: printf '%s\n' '${list_files.outputs.stdout}'
    depends: list_files

The action returns a JSON output object. Use ${step.outputs.stdout} for small listings or command output. For large listings, exports, or command logs, write to an artifact instead of routing the data through action outputs.

Use copy when the destination should accumulate or update files without mirroring deletions:

yaml
steps:
  - id: copy_to_backup
    action: rclone@v1
    with:
      command: copy
      source: /data/reports
      destination: backup:reports
      checksum: true
      transfers: 4

sync, move, moveto, rmdir, delete, and purge are treated as destructive. They fail unless either dryRun: true or allowDestructive: true is set:

yaml
steps:
  - id: preview_sync
    action: rclone@v1
    with:
      command: sync
      source: /data/reports
      destination: backup:reports
      dryRun: true

  - id: run_sync
    action: rclone@v1
    with:
      command: sync
      source: /data/reports
      destination: backup:reports
      allowDestructive: true
    depends: preview_sync

Inputs

FieldDescription
commandRequired rclone command to run.
sourceSource path or remote, required by commands that read from a path.
destinationDestination path or remote, required by two-path commands.
configPathOptional path passed with --config.
workdirOptional directory to cd into before running rclone.
dryRunAdd --dry-run.
allowDestructiveRequired for destructive commands unless dryRun is true.
checksumAdd --checksum.
fastListAdd --fast-list.
verboseAdd -v.
statsOptional value for --stats, such as 30s or 0.
logLevelOptional DEBUG, INFO, NOTICE, or ERROR.
transfers / checkersOptional values for --transfers and --checkers.
include / exclude / filterRepeated include, exclude, and filter rules.
extraArgsAdditional rclone flags passed after the command and before paths.
envExtra environment variables exposed to rclone.
maxOutputBytesMaximum stdout and stderr bytes captured into action outputs. Defaults to 1048576.

Outputs

FieldDescription
oktrue when rclone exits with code 0.
commandrclone command that was run.
stdout / stderrCaptured rclone stdout and stderr.
stdoutTruncated / stderrTruncatedWhether stdout or stderr capture was truncated.
durationMsWrapper-measured command duration in milliseconds.
exitCoderclone process exit code.
errorError message when validation or rclone execution fails.

For large listings, attach rclone stdout directly to an artifact by calling the pinned CLI in a normal step:

yaml
tools:
  - rclone/rclone@v1.74.1

steps:
  - id: list_large_tree
    run: rclone lsf backup:reports --recursive
    stdout:
      artifact: rclone/reports.txt

Released under the MIT License.