3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-17 03:47:20 +00:00

String literals need to be inside single-quotes (#319)

* String literals need to be inside single-quotes

Per https://docs.github.com/en/actions/learn-github-actions/expressions#literals
string	You must use single quotes. Escape literal single-quotes with a single quote.

* Update README.md

Co-authored-by: Tonye Jack <jtonye@ymail.com>
This commit is contained in:
James Cheng 2022-01-21 08:19:23 -08:00 committed by GitHub
parent 7dfde9f9fe
commit 204ed812d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,12 +156,12 @@ Support this project with a :star:
done done
- name: Run step when a file changes - name: Run step when a file changes
if: contains(steps.changed-files.outputs.modified_files, "my-file.txt") if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
run: | run: |
echo "Your my-file.txt file has been modified." echo "Your my-file.txt file has been modified."
- name: Run step when a file has been deleted - name: Run step when a file has been deleted
if: contains(steps.changed-files.outputs.deleted_files, "test.txt") if: contains(steps.changed-files.outputs.deleted_files, 'test.txt')
run: | run: |
echo "Your test.txt file has been deleted." echo "Your test.txt file has been deleted."
@ -181,24 +181,24 @@ Support this project with a :star:
**/migrate-*.sql **/migrate-*.sql
- name: Run step if any of the listed files above change - name: Run step if any of the listed files above change
if: steps.changed-files-specific.outputs.any_changed == "true" if: steps.changed-files-specific.outputs.any_changed == 'true'
run: | run: |
echo "One or more files listed above has changed." echo "One or more files listed above has changed."
- name: Run step if only the files listed above change - name: Run step if only the files listed above change
if: steps.changed-files-specific.outputs.only_changed == "true" if: steps.changed-files-specific.outputs.only_changed == 'true'
run: | run: |
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.outputs.any_deleted == 'true'
run: | run: |
for file in ${{ steps.changed-files.outputs.deleted_files }}; do for file in ${{ steps.changed-files.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.outputs.only_deleted == 'true'
run: | run: |
for file in ${{ steps.changed-files.outputs.deleted_files }}; do for file in ${{ steps.changed-files.outputs.deleted_files }}; do
echo "$file was deleted" echo "$file was deleted"