This is an automated email from the ASF dual-hosted git repository.

blaginin pushed a commit to branch bash-push
in repository https://gitbox.apache.org/repos/asf/datafusion.git

commit fce8bc305631be6d0b6c26fd72a9ee4408bf88a8
Author: blaginin <[email protected]>
AuthorDate: Wed Nov 12 18:09:40 2025 +0000

    Check files directly
---
 .github/workflows/rust.yml | 61 +++++++++++++++++++++++++++++++++++++---------
 1 file changed, 50 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index d7571c3371..fcc922c444 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -40,19 +40,58 @@ jobs:
   check-files:
     runs-on: ubuntu-latest
     outputs:
-      should_skip: ${{ steps.filter.outputs.code == 'false' }}
+      should_skip: ${{ steps.check.outputs.should_skip }}
     steps:
       - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8  # 
v5.0.0
-      - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36  # 
v3.0.2
-        id: filter
-        with:
-          filters: |
-            code:
-              - '**'
-              - '!**.md'
-              - '!docs/**'
-              - '!.github/ISSUE_TEMPLATE/**'
-              - '!.github/pull_request_template.md'
+      - name: Check if only docs were changed
+        id: check
+        env:
+          # Patterns for files that should NOT trigger CI runs
+          SKIP_PATTERNS: |
+            *.md
+            docs/*
+            .github/ISSUE_TEMPLATE/*
+            .github/pull_request_template.md
+        run: |
+          # For non-PR events, never skip
+          if [ "${{ github.event_name }}" != "pull_request" ]; then
+            echo "Not a PR, never skip"
+            echo "should_skip=false" >> $GITHUB_OUTPUT
+            exit 0
+          fi
+
+          # For PRs, check if only docs/markdown were changed
+          echo "PR detected, checking changed files..."
+
+          # Get changed files (comparing merge commit with base branch)
+          IFS=$'\n' changed_files=($(git --no-pager diff --name-only HEAD^1))
+
+          echo "Changed files:"
+          printf '%s\n' "${changed_files[@]}"
+
+          should_skip=true
+          for file in "${changed_files[@]}"; do
+            file_matches_skip_pattern=false
+
+            # Check against each skip pattern
+            while IFS= read -r pattern; do
+              [[ -z "$pattern" ]] && continue
+              if [[ "$file" == $pattern ]]; then
+                file_matches_skip_pattern=true
+                break
+              fi
+            done <<< "$SKIP_PATTERNS"
+
+            if [ "$file_matches_skip_pattern" = true ]; then
+              echo "  $file - docs/markdown (skip)"
+            else
+              echo "  $file - code (run checks)"
+              should_skip=false
+            fi
+          done
+
+          echo "should_skip=$should_skip" >> $GITHUB_OUTPUT
+          echo "should_skip=$should_skip"
 
   # Check crate compiles and base cargo check passes
   linux-build-lib:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to