mirror of
https://github.com/tj-actions/changed-files
synced 2025-03-05 11:06:22 +00:00
Update README.md
This commit is contained in:
parent
d17d3f38e4
commit
f4e014f855
1 changed files with 48 additions and 47 deletions
95
README.md
95
README.md
|
@ -3,53 +3,6 @@ changed-files
|
|||
|
||||
Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---diff-filterACDMRTUXB82308203) to locate all files that have been modified relative to the default branch.
|
||||
|
||||
```yaml
|
||||
...
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- 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:
|
||||
# }
|
||||
```
|
||||
|
||||
|
||||
## Inputs
|
||||
|
||||
|
@ -59,8 +12,56 @@ Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git
|
|||
|
||||
|
||||
|
||||
## Outputs
|
||||
|
||||
Using the default separator.
|
||||
|
||||
| Output | type | example | description |
|
||||
|:-------------------:|:------------:|:------------------------------:|:----------------------------------------:|
|
||||
| added_files | `string` | 'new.txt other.png ...' | Select only files that are Added (A) |
|
||||
| copied_files | `string` | 'new.txt other.png ...' | Select only files that are Copied (C) |
|
||||
| deleted_files | `string` | 'new.txt other.png ...' | Select only files that are Deleted (D) |
|
||||
| modified_files | `string` | 'new.txt other.png ...' | Select only files that are Modified (M) |
|
||||
| renamed_files | `string` | 'new.txt other.png ...' | Select only files that are Renamed (R) |
|
||||
| changed_files | `string` | 'new.txt other.png ...' | Select only files that have their type changed (T) |
|
||||
| unmerged_files | `string` | 'new.txt other.png ...' | Select only files that are Unmerged (U) |
|
||||
| unknown_files | `string` | 'new.txt other.png ...' | Select only files that are Unknown (X) |
|
||||
| all_changed_files | `string` | 'new.txt other.png ...' | Select all paths (*) are selected if there <br/> is any file that matches other <br/> criteria in the comparison; <br/> if there is no file that <br/> matches other criteria, <br/> nothing is selected. |
|
||||
|
||||
|
||||
# {
|
||||
# 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:
|
||||
# }
|
||||
|
||||
## Usage
|
||||
|
||||
```yaml
|
||||
...
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get modified files with defaults
|
||||
id: changed-files
|
||||
uses: ./
|
||||
|
||||
- name: Get modified files with comma separator
|
||||
id: changed-files-comma
|
||||
uses: ./
|
||||
with:
|
||||
separator: ","
|
||||
```
|
||||
|
||||
|
||||
* Free software: [MIT license](LICENSE)
|
||||
|
||||
|
||||
Features
|
||||
--------
|
||||
- Added Files
|
||||
|
|
Loading…
Add table
Reference in a new issue