diff --git a/.circleci/config.continue.yml.j2 b/.circleci/config.continue.yml.j2 index 027f914fbec..af1770db9d7 100644 --- a/.circleci/config.continue.yml.j2 +++ b/.circleci/config.continue.yml.j2 @@ -167,7 +167,8 @@ commands: if [[ "$BRANCH" != "master" ]] && [[ "$BRANCH" != "release/*" ]]; then # We know that we have checked out the PR merge branch, so the HEAD commit is a merge # As a backup, if anything goes wrong with the diff, the build will fail - CHANGED_FILES=$(git show HEAD | grep -e "^Merge:" | cut -d ' ' -f 2- | sed 's/ /.../' | xargs git diff --name-only) + # Get list of changed files directly using git diff-tree to avoid issues with large binary files + CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r HEAD) # Count the number of matches, and ignore if the grep doesn't match anything MATCH_COUNT=$(echo "$CHANGED_FILES" | grep -c -E "<< pipeline.parameters.global_pattern >>|<< parameters.pattern >>") || true if [[ "$MATCH_COUNT" -eq "0" ]]; then