From d004ef8e15bb2182b386dcac7ca81f9a2e199a6b Mon Sep 17 00:00:00 2001 From: Najib Ishaq Date: Thu, 18 Jul 2024 10:24:23 -0400 Subject: [PATCH] ci: ignoring files that were deleted --- .github/workflows/package-filter.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package-filter.yml b/.github/workflows/package-filter.yml index 9ab8f353b..6f4d3ca46 100644 --- a/.github/workflows/package-filter.yml +++ b/.github/workflows/package-filter.yml @@ -63,7 +63,17 @@ jobs: echo "The comparison point is ${comparison_point}" # Get the changed files - changed_files=$(git diff --name-only ${comparison_point}...) + # the `--diff-filter=ACMR` flag filters out deleted files. The filters are as follows: + # A: Added + # C: Copied + # M: Modified + # R: Renamed + # D: Deleted + # T: Type changed (for example, regular file or symlink or submodule) + # U: Unmerged + # X: Unknown + # B: Broken pairing + changed_files=$(git diff --diff-filter=ACMR --name-only ${comparison_point}...) # echo the changed files echo "The changed files are $changed_files"