Compare commits

...

3 Commits

Author SHA1 Message Date
Piers Beckley
ae66602ce7
Allow files with spaces (#12) 2022-10-17 10:41:08 +01:00
Marjorie Roswell
6bae380f8f
Fix small typo (#6) 2021-04-02 07:29:24 +01:00
Carlos Juan Gómez Peñalver
eae666fc01
Add flags argumen to allow modifiers on the cp command (#3) 2020-06-10 08:54:13 +01:00
5 changed files with 21 additions and 3 deletions

View File

@ -11,3 +11,15 @@ jobs:
with:
source: "tests/a.txt"
target: "test-a.txt"
- name: copy file with args
uses: canastro/copy-file-action@master
with:
source: "tests/a.txt"
target: "test-a.txt"
flags: "-f"
- name: copy file with spaces
uses: canastro/copy-file-action@master
with:
source: "tests/path with spaces.txt"
target: "path-without-spaces.txt"

View File

@ -1,6 +1,6 @@
## Usage
copy files and artifacts via SSH as blow.
copy files and artifacts via SSH as below.
```yaml
name: copy files

View File

@ -2,6 +2,10 @@ name: 'Copy file'
description: 'Copy local files'
author: 'Ricardo Canastro'
inputs:
flags:
description: 'Flags to use on the cp command. See "man cp" or "cp --help" for more details'
required: false
default: ''
source:
description: 'Source file'
required: true
@ -12,6 +16,7 @@ runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{inputs.flags}}
- ${{inputs.source}}
- ${{inputs.target}}
branding:

View File

@ -1,3 +1,3 @@
#!/bin/sh -l
cp $1 $2
cp $1 "$2" "$3"

View File

@ -0,0 +1 @@
Test file for copying a file with spaces in its path