mirror of
https://github.com/canastro/copy-action.git
synced 2024-12-27 19:45:02 +08:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ae66602ce7 | ||
![]() |
6bae380f8f | ||
![]() |
eae666fc01 |
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@ -11,3 +11,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
source: "tests/a.txt"
|
source: "tests/a.txt"
|
||||||
target: "test-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"
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
copy files and artifacts via SSH as blow.
|
copy files and artifacts via SSH as below.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: copy files
|
name: copy files
|
||||||
|
@ -2,6 +2,10 @@ name: 'Copy file'
|
|||||||
description: 'Copy local files'
|
description: 'Copy local files'
|
||||||
author: 'Ricardo Canastro'
|
author: 'Ricardo Canastro'
|
||||||
inputs:
|
inputs:
|
||||||
|
flags:
|
||||||
|
description: 'Flags to use on the cp command. See "man cp" or "cp --help" for more details'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
source:
|
source:
|
||||||
description: 'Source file'
|
description: 'Source file'
|
||||||
required: true
|
required: true
|
||||||
@ -12,6 +16,7 @@ runs:
|
|||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
args:
|
args:
|
||||||
|
- ${{inputs.flags}}
|
||||||
- ${{inputs.source}}
|
- ${{inputs.source}}
|
||||||
- ${{inputs.target}}
|
- ${{inputs.target}}
|
||||||
branding:
|
branding:
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh -l
|
#!/bin/sh -l
|
||||||
|
|
||||||
cp $1 $2
|
cp $1 "$2" "$3"
|
1
tests/path with spaces.txt
Normal file
1
tests/path with spaces.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
Test file for copying a file with spaces in its path
|
Loading…
x
Reference in New Issue
Block a user