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 ```yaml
... ...
- name: Get changed files - name: Get changed files
id: changed-files id: changed-files-specific
uses: tj-actions/changed-files@v35 uses: tj-actions/changed-files@v35
with: with:
files: | files: |
@ -311,16 +311,16 @@ See [inputs](#inputs) for more information.
echo "Only files listed above have changed." echo "Only files listed above have changed."
- name: Run step if any of the listed files above is deleted - 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: | 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" echo "$file was deleted"
done done
- name: Run step if all listed files above have been deleted - 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: | 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" echo "$file was deleted"
done done
... ...