mirror of
https://github.com/tj-actions/changed-files
synced 2025-01-29 13:34:51 +00:00
Make example consistent and out of the box usable (#931)
Co-authored-by: Tonye Jack <jtonye@ymail.com>
This commit is contained in:
parent
4f9f822a4a
commit
9a6dabf8d1
1 changed files with 5 additions and 5 deletions
10
README.md
10
README.md
|
@ -289,7 +289,7 @@ See [inputs](#inputs) for more information.
|
|||
```yaml
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v35
|
||||
with:
|
||||
files: |
|
||||
|
@ -311,16 +311,16 @@ See [inputs](#inputs) for more information.
|
|||
echo "Only files listed above have changed."
|
||||
|
||||
- name: Run step if any of the listed files above is deleted
|
||||
if: steps.changed-files.outputs.any_deleted == 'true'
|
||||
if: steps.changed-files-specific.outputs.any_deleted == 'true'
|
||||
run: |
|
||||
for file in ${{ steps.changed-files.outputs.deleted_files }}; do
|
||||
for file in ${{ steps.changed-files-specific.outputs.deleted_files }}; do
|
||||
echo "$file was deleted"
|
||||
done
|
||||
|
||||
- name: Run step if all listed files above have been deleted
|
||||
if: steps.changed-files.outputs.only_deleted == 'true'
|
||||
if: steps.changed-files-specific.outputs.only_deleted == 'true'
|
||||
run: |
|
||||
for file in ${{ steps.changed-files.outputs.deleted_files }}; do
|
||||
for file in ${{ steps.changed-files-specific.outputs.deleted_files }}; do
|
||||
echo "$file was deleted"
|
||||
done
|
||||
...
|
||||
|
|
Loading…
Reference in a new issue