mirror of
https://github.com/tj-actions/changed-files
synced 2025-03-06 05:17:44 +00:00
Update README.md
This commit is contained in:
parent
d17d3f38e4
commit
f4e014f855
1 changed files with 48 additions and 47 deletions
79
README.md
79
README.md
|
@ -3,40 +3,32 @@ 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.
|
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:
|
## Inputs
|
||||||
# {
|
|
||||||
# added_files: ,
|
| Input | type | required | default | description |
|
||||||
# copied_files: ,
|
|:-------------:|:-----------:|:-------------:|:----------------------------:|:-------------:|
|
||||||
# deleted_files: ,
|
| separator | `string` | `true` | `' '` | Separator to return outputs |
|
||||||
# modified_files: .github/workflows/test.yml HISTORY.md action.yml,
|
|
||||||
# renamed_files: ,
|
|
||||||
# changed_files: ,
|
|
||||||
# unmerged_files: ,
|
## Outputs
|
||||||
# unknown_files: ,
|
|
||||||
# all_changed_files:
|
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. |
|
||||||
|
|
||||||
- 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: ,
|
# added_files: ,
|
||||||
# copied_files: ,
|
# copied_files: ,
|
||||||
|
@ -48,19 +40,28 @@ Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git
|
||||||
# unknown_files: ,
|
# unknown_files: ,
|
||||||
# all_changed_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: ","
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Inputs
|
|
||||||
|
|
||||||
| Input | type | required | default | description |
|
|
||||||
|:-------------:|:-----------:|:-------------:|:----------------------------:|:-------------:|
|
|
||||||
| separator | `string` | `true` | `' '` | Separator to return outputs |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* Free software: [MIT license](LICENSE)
|
* Free software: [MIT license](LICENSE)
|
||||||
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
- Added Files
|
- Added Files
|
||||||
|
|
Loading…
Add table
Reference in a new issue