copy_file

Copies a file to a different path in the repository, retaining the original file at its original path.

Arguments

NameTypeDescriptionRequired

source_path

string

The relative path to the file that needs to be copied over.

destination_path

string

The relative path to the directory where the file should be copied to.

new_file_name

string

The name of the file that should be copied. If not provided,we will check if the destination path has a filename. Otherwise, we will use the original name of the file from the source path.

Returns

TypeDescription

string

The new path to the file.

Example

- name: copy_file
  arguments:
    source_path: <relative/path/to/file>
    destination_path: <relative/path/to/directory>
    new_file_name: <new-file-name>
  returns: <new-path-to-file>

Last updated