Merge pull request #611 from tj-actions/chore/test-using-for-loop-with-output
chore: test using for loop with output
This commit is contained in:
commit
98d07d49b8
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@ -416,6 +416,15 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
|
- name: List all modified files
|
||||||
|
run: |
|
||||||
|
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
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
echo '${{ toJSON(steps.changed-files-comma.outputs) }}'
|
echo '${{ toJSON(steps.changed-files-comma.outputs) }}'
|
||||||
|
@ -1 +1 @@
|
|||||||
This is a test file.
|
This is test file 1.
|
||||||
|
@ -1 +1 @@
|
|||||||
This is a test file.
|
This is test file 2.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user