mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 23:44:46 +00:00
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
3 changed files with 11 additions and 2 deletions
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…
Reference in a new issue