3
0
Fork 0
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:
Tonye Jack 2022-09-04 23:36:24 -06:00 committed by GitHub
commit 98d07d49b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View file

@ -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) }}'

View file

@ -1 +1 @@
This is a test file. This is test file 1.

View file

@ -1 +1 @@
This is a test file. This is test file 2.