Skip tinify if no added or modified files (#92)

This commit is contained in:
Jonah Lawrence 2023-03-27 10:48:55 +03:00 committed by GitHub
parent 4f99f786f5
commit b2d058ff59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ jobs:
- name: Tinify Images
run: |
if [ -z "${{ steps.changed.outputs.added_modified }}" ]; then
echo "No files changed, skipping"
exit 0
fi
python .github/scripts/tinify_images.py \
-d images \
-ff ${{ steps.changed.outputs.added_modified }} \