diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 61c045a..a7a0483 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,13 +7,19 @@ jobs: steps: - uses: actions/checkout@master - name: copy file - uses: canastro/copy-file-action@master + uses: piersb/copy-file-action@allow-files-with-spaces with: source: "tests/a.txt" target: "test-a.txt" - name: copy file with args - uses: canastro/copy-file-action@master + uses: piersb/copy-file-action@allow-files-with-spaces with: source: "tests/a.txt" target: "test-a.txt" flags: "-f" + - name: copy file with args + uses: piersb/copy-file-action@allow-files-with-spaces + with: + source: "tests/path with spaces.txt" + target: "path-without-spaces.txt" + \ No newline at end of file diff --git a/action.yml b/action.yml index 9f1a201..227ac00 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: 'Copy file' +name: 'Copy file (with spaces)' description: 'Copy local files' author: 'Ricardo Canastro' inputs: diff --git a/entrypoint.sh b/entrypoint.sh index 495dc4f..5f647bc 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,3 +1,25 @@ -#!/bin/sh -l +#!/bin/bash -l -cp $1 $2 $3 \ No newline at end of file +#bash -c "$(cp ' %q' "$@")" + +echo "hello" +>&2 echo "test debug message" + +time=$(date) +echo "::set-output name=time::$time" + + +ENV ARG_1=$1 +ENV ARG_2=$2 +ENV ARG_3=$3 + + +echo $1 >> /tmp/logs.txt +echo $2 >> /tmp/logs.txt +echo $3 >> /tmp/logs.txt + +echo >> /tmp/logs.txt "Receiving " $# " arguments" + +echo "trying to run cp " "$2 " "$3" + +#cp "$2" "$3" \ No newline at end of file diff --git a/test b/test new file mode 100644 index 0000000..e69de29 diff --git a/tests/path with spaces.txt b/tests/path with spaces.txt new file mode 100644 index 0000000..b4937cf --- /dev/null +++ b/tests/path with spaces.txt @@ -0,0 +1 @@ +Test file for copying a file with spaces in its path