From b0f41b62b1cf04be4a339f9302a817698ca3aa8f Mon Sep 17 00:00:00 2001 From: Piers Beckley Date: Tue, 23 Aug 2022 16:01:01 +0100 Subject: [PATCH 1/9] first clonage success --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c36e94e..b7b3331 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,18 +7,18 @@ jobs: steps: - uses: actions/checkout@master - name: copy file - uses: piersb/copy-file-action@main + uses: piersb/copy-action-pb@0.0.3 with: source: "tests/a.txt" target: "test-a.txt" - name: copy file with args - uses: piersb/copy-file-action@main + uses: piersb/copy-action-pb@0.0.3 with: source: "tests/a.txt" target: "test-a.txt" flags: "-f" - name: copy file with args - uses: piersb/copy-file-action@main + uses: piersb/copy-action-pb@0.0.3 with: source: "tests/path with spaces.txt" target: "path-without-spaces.txt" From 8d058becc237be5d978563231d7e994b8f89589d Mon Sep 17 00:00:00 2001 From: Piers Beckley Date: Tue, 23 Aug 2022 16:17:17 +0100 Subject: [PATCH 2/9] Alpine does not have bash --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 5f647bc..677f362 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash -l +#!/bin/sh -l #bash -c "$(cp ' %q' "$@")" From f4bde39f6fe374de9a3b09886fc41fe9bea30832 Mon Sep 17 00:00:00 2001 From: Piers Beckley Date: Tue, 23 Aug 2022 16:27:36 +0100 Subject: [PATCH 3/9] cut down on the fluff --- .github/workflows/main.yml | 8 ++++---- entrypoint.sh | 16 +--------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b7b3331..039bd6c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,18 +7,18 @@ jobs: steps: - uses: actions/checkout@master - name: copy file - uses: piersb/copy-action-pb@0.0.3 + uses: piersb/copy-action-pb@0.0.4 with: source: "tests/a.txt" target: "test-a.txt" - name: copy file with args - uses: piersb/copy-action-pb@0.0.3 + uses: piersb/copy-action-pb@0.0.4 with: source: "tests/a.txt" target: "test-a.txt" flags: "-f" - - name: copy file with args - uses: piersb/copy-action-pb@0.0.3 + - name: copy file with spaces + uses: piersb/copy-action-pb@0.0.4 with: source: "tests/path with spaces.txt" target: "path-without-spaces.txt" diff --git a/entrypoint.sh b/entrypoint.sh index 677f362..5a2aa90 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,19 +1,5 @@ #!/bin/sh -l -#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 @@ -22,4 +8,4 @@ echo >> /tmp/logs.txt "Receiving " $# " arguments" echo "trying to run cp " "$2 " "$3" -#cp "$2" "$3" \ No newline at end of file +cp "$2" "$3" \ No newline at end of file From fe951f98d5d67607139866492b6249bae49510b1 Mon Sep 17 00:00:00 2001 From: Piers Beckley Date: Tue, 23 Aug 2022 16:29:07 +0100 Subject: [PATCH 4/9] This should theoretically work! --- entrypoint.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 5a2aa90..a573fac 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,11 +1,3 @@ #!/bin/sh -l -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 +cp "$1" "$2" "$3" \ No newline at end of file From 41c7cf2aaa3529566bf2b0cff6ce05f9ba404c04 Mon Sep 17 00:00:00 2001 From: Piers Beckley Date: Tue, 23 Aug 2022 16:31:21 +0100 Subject: [PATCH 5/9] update to ?working? version --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 039bd6c..8e624a2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,18 +7,18 @@ jobs: steps: - uses: actions/checkout@master - name: copy file - uses: piersb/copy-action-pb@0.0.4 + uses: piersb/copy-action-pb@0.0.5 with: source: "tests/a.txt" target: "test-a.txt" - name: copy file with args - uses: piersb/copy-action-pb@0.0.4 + uses: piersb/copy-action-pb@0.0.5 with: source: "tests/a.txt" target: "test-a.txt" flags: "-f" - name: copy file with spaces - uses: piersb/copy-action-pb@0.0.4 + uses: piersb/copy-action-pb@0.0.5 with: source: "tests/path with spaces.txt" target: "path-without-spaces.txt" From ed8be5854d2823c977199e7902d59e1e26e0c0da Mon Sep 17 00:00:00 2001 From: Piers Beckley Date: Tue, 23 Aug 2022 16:32:33 +0100 Subject: [PATCH 6/9] Perhaps we need to keep the first argument deglobbed? --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index a573fac..8cfc997 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,3 +1,3 @@ #!/bin/sh -l -cp "$1" "$2" "$3" \ No newline at end of file +cp $1 "$2" "$3" \ No newline at end of file From 0f4f17c1902b1e6af1fb3d119b737b88c56d44cf Mon Sep 17 00:00:00 2001 From: Piers Beckley Date: Tue, 23 Aug 2022 17:00:05 +0100 Subject: [PATCH 7/9] Upgrade demo info to latest published version --- .github/workflows/main.yml | 6 +++--- test | 0 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e624a2..dcbfa2a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,18 +7,18 @@ jobs: steps: - uses: actions/checkout@master - name: copy file - uses: piersb/copy-action-pb@0.0.5 + uses: piersb/copy-action-pb@0.0.6 with: source: "tests/a.txt" target: "test-a.txt" - name: copy file with args - uses: piersb/copy-action-pb@0.0.5 + uses: piersb/copy-action-pb@0.0.6 with: source: "tests/a.txt" target: "test-a.txt" flags: "-f" - name: copy file with spaces - uses: piersb/copy-action-pb@0.0.5 + uses: piersb/copy-action-pb@0.0.6 with: source: "tests/path with spaces.txt" target: "path-without-spaces.txt" diff --git a/test b/test deleted file mode 100644 index e69de29..0000000 From eea2a85d216621b2baea26b58192e645fe3d675b Mon Sep 17 00:00:00 2001 From: Piers Beckley Date: Wed, 24 Aug 2022 15:38:08 +0100 Subject: [PATCH 8/9] Reset test files to use canastro version --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dcbfa2a..3eb8e07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,18 +7,18 @@ jobs: steps: - uses: actions/checkout@master - name: copy file - uses: piersb/copy-action-pb@0.0.6 + uses: canastro/copy-file-action@master with: source: "tests/a.txt" target: "test-a.txt" - name: copy file with args - uses: piersb/copy-action-pb@0.0.6 + uses: canastro/copy-file-action@master with: source: "tests/a.txt" target: "test-a.txt" flags: "-f" - name: copy file with spaces - uses: piersb/copy-action-pb@0.0.6 + uses: canastro/copy-file-action@master with: source: "tests/path with spaces.txt" target: "path-without-spaces.txt" From 4bb4b8c5daebe65ab3cb195a2863337f95f8f7a4 Mon Sep 17 00:00:00 2001 From: Piers Beckley Date: Wed, 24 Aug 2022 15:38:53 +0100 Subject: [PATCH 9/9] Return to original name --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 227ac00..9f1a201 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: 'Copy file (with spaces)' +name: 'Copy file' description: 'Copy local files' author: 'Ricardo Canastro' inputs: