3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-02-19 15:23:42 +00:00

Update README.md

This commit is contained in:
Tonye Jack 2021-04-02 08:08:05 -04:00 committed by GitHub
parent 68680cd505
commit ea54bfb72a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,17 @@ Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git
for file in "${{ steps.changed-files.outputs.added_files }}"; do
echo $file
done
- name: Run step when a file changes in a PR relative to the default branch
if: contains(${{ steps.changed-files.outputs.modified_files }}, 'my-file.txt')
run: |
echo "Your file my-file.txt has been modified."
- name: Run step when a file is deleted in a PR relative to the default branch
if: contains(${{ steps.changed-files.outputs.deleted_files }}, 'test.txt')
run: |
echo "Your test.txt has been deleted."
```