From 2518d5038ffeb563388ba02964b6e131cf23c5bd Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Thu, 24 Feb 2022 12:47:42 -0800 Subject: [PATCH] Exclude deleted images from optimize workflow (#25637) --- .github/workflows/optimize-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/optimize-images.yml b/.github/workflows/optimize-images.yml index bf7c46442827..756cd12425a2 100644 --- a/.github/workflows/optimize-images.yml +++ b/.github/workflows/optimize-images.yml @@ -41,7 +41,7 @@ jobs: git checkout $GITHUB_HEAD_REF echo "List the files that changed" - git diff --name-only $GITHUB_HEAD_REF $GITHUB_BASE_REF + git diff --name-only --diff-filter=d $GITHUB_BASE_REF $GITHUB_HEAD_REF echo "Run optipng on pngs in from the diff" git diff --name-only -z $GITHUB_HEAD_REF $GITHUB_BASE_REF -- '*.png' | xargs -0 optipng -nx