From be849d161216bb5d3ec96d6340eee7d6c36ad249 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sun, 4 Sep 2022 22:28:32 -0600 Subject: [PATCH 1/5] chore: test using for loop with output --- .github/workflows/test.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7fc59dde0b3..a36212abde4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -416,6 +416,15 @@ jobs: uses: ./ with: separator: "," + - name: List all modified files + run: | + IFS=$',' + for file in ${{ steps.changed-files-comma.outputs.modified_files }}; do + echo $file + done + unset IFS + shell: + bash - name: Show output run: | echo '${{ toJSON(steps.changed-files-comma.outputs) }}' From bf534010c8ace3b80506c1afea3eb9db883379ee Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sun, 4 Sep 2022 22:29:27 -0600 Subject: [PATCH 2/5] Update test rename 2.txt --- test/test rename 2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test rename 2.txt b/test/test rename 2.txt index 6de7b8c69d6..a938d27c661 100644 --- a/test/test rename 2.txt +++ b/test/test rename 2.txt @@ -1 +1 @@ -This is a test file. +This is test file 2. From 48326e19ea86c6453fea1ad05a8b1676407d93a8 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sun, 4 Sep 2022 22:29:48 -0600 Subject: [PATCH 3/5] Update test rename 1.txt --- test/test rename 1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test rename 1.txt b/test/test rename 1.txt index 6de7b8c69d6..7462db65924 100644 --- a/test/test rename 1.txt +++ b/test/test rename 1.txt @@ -1 +1 @@ -This is a test file. +This is test file 1. From 01d9c79ad26a08fffc6f80af74877163762ccd65 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sun, 4 Sep 2022 23:20:36 -0600 Subject: [PATCH 4/5] Update test.yml --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a36212abde4..aae9439ed74 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -418,8 +418,7 @@ jobs: separator: "," - name: List all modified files run: | - IFS=$',' - for file in ${{ steps.changed-files-comma.outputs.modified_files }}; do + IFS=$','; for file in ${{ steps.changed-files-comma.outputs.modified_files }}; do echo $file done unset IFS From bbc26e5efaac95800bcaa2e4cd98c753f38034dc Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sun, 4 Sep 2022 23:34:23 -0600 Subject: [PATCH 5/5] Update test.yml --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aae9439ed74..879816ff8c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -418,7 +418,8 @@ jobs: separator: "," - name: List all modified files run: | - IFS=$','; for file in ${{ steps.changed-files-comma.outputs.modified_files }}; do + IFS=$',' read -a MODIFIED_FILES_ARRAY <<< "${{ steps.changed-files-comma.outputs.modified_files }}" + for file in "${MODIFIED_FILES_ARRAY[@]}"; do echo $file done unset IFS