Add flags argumen to allow modifiers on the cp command (#3)

This commit is contained in:
Carlos Juan Gómez Peñalver 2020-06-10 08:54:13 +01:00 committed by GitHub
parent 7ddff6fc15
commit eae666fc01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View File

@ -10,4 +10,10 @@ jobs:
uses: canastro/copy-file-action@master
with:
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"

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