3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-01-17 19:17:45 +00:00

Update README.md

This commit is contained in:
Tonye Jack 2021-03-05 07:49:00 -05:00 committed by GitHub
parent ee1e50f1df
commit b13dd562b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,8 +7,47 @@ Get modified files
...
steps:
- uses: actions/checkout@v2
- name: Get modified files
uses: tj-actions/changed-files@v1
- name: Get modified files with defaults
id: changed-files
uses: ./
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files.outputs) }}"
# Outputs:
# {
# added_files: ,
# copied_files: ,
# deleted_files: ,
# modified_files: .github/workflows/test.yml HISTORY.md action.yml ,
# renamed_files: ,
# changed_files: ,
# unmerged_files: ,
# unknown_files: ,
# all_changed_files:
# }
- name: Get modified files with comma separator
id: changed-files-comma
uses: ./
with:
separator: ","
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files-comma.outputs) }}"
# Outputs:
# {
# added_files: ,
# copied_files: ,
# deleted_files: ,
# modified_files: .github/workflows/test.yml,HISTORY.md,action.yml,,
# renamed_files: ,
# changed_files: ,
# unmerged_files: ,
# unknown_files: ,
# all_changed_files:
# }
```