This is an automated email from the ASF dual-hosted git repository. blaginin pushed a commit to branch dorny-path-filter in repository https://gitbox.apache.org/repos/asf/datafusion-sandbox.git
commit 22a152c01d7efe151e464b3bf434ecd81b1d6508 Author: blaginin <[email protected]> AuthorDate: Sun Nov 23 16:28:49 2025 +0000 Use `dorny/paths-filter` again --- .github/workflows/rust.yml | 66 ++++++++-------------------------------------- 1 file changed, 11 insertions(+), 55 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cb1cb054b..d7571c337 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -40,63 +40,19 @@ jobs: check-files: runs-on: ubuntu-latest outputs: - should_skip: ${{ steps.check.outputs.should_skip }} + should_skip: ${{ steps.filter.outputs.code == 'false' }} steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - fetch-depth: 0 # Need history for comparison - - 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..." - - # Fetch the base branch to compare against - git fetch origin "${{ github.base_ref }}" - - # Get changed files (comparing PR head with base branch) - IFS=$'\n' changed_files=($(git --no-pager diff --name-only "origin/${{ github.base_ref }}"...HEAD)) - - 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" + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: filter + with: + filters: | + code: + - '**' + - '!**.md' + - '!docs/**' + - '!.github/ISSUE_TEMPLATE/**' + - '!.github/pull_request_template.md' # Check crate compiles and base cargo check passes linux-build-lib: --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
