3
0
Fork 0
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:
Chiel Fernhout 2023-01-05 20:24:02 +01:00 committed by GitHub
parent 4f9f822a4a
commit 9a6dabf8d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
...