From 310fc56f96634c72a037739e2284f940e0f5a403 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Fri, 17 Apr 2026 20:16:39 -0700 Subject: [PATCH] fix(ci): replace dorny/paths-filter with git diff (macOS compat) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dorny/paths-filter uses Docker internally which doesn't work on the self-hosted macOS arm64 runner — every CI run since the path filter change has failed with no jobs. Replace with a simple git diff against HEAD~1 that checks path prefixes. Same behavior, no Docker dependency. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7013f86f..23fb0d4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,35 +8,27 @@ on: jobs: # Detect which paths changed so downstream jobs can skip when only - # docs/markdown files were modified. Saves ~15 min of runner time per - # docs-only PR. + # docs/markdown files were modified. Uses git diff (no Docker — works + # on macOS self-hosted runners unlike dorny/paths-filter). changes: name: Detect changes runs-on: [self-hosted, macos, arm64] outputs: - platform: ${{ steps.filter.outputs.platform }} - canvas: ${{ steps.filter.outputs.canvas }} - python: ${{ steps.filter.outputs.python }} - scripts: ${{ steps.filter.outputs.scripts }} + platform: ${{ steps.check.outputs.platform }} + canvas: ${{ steps.check.outputs.canvas }} + python: ${{ steps.check.outputs.python }} + scripts: ${{ steps.check.outputs.scripts }} steps: - uses: actions/checkout@v4 - - uses: dorny/paths-filter@v3 - id: filter with: - filters: | - platform: - - 'platform/**' - - '.github/workflows/ci.yml' - canvas: - - 'canvas/**' - - '.github/workflows/ci.yml' - python: - - 'workspace-template/**' - - '.github/workflows/ci.yml' - scripts: - - 'tests/e2e/**' - - 'scripts/**' - - '.github/workflows/ci.yml' + fetch-depth: 2 + - id: check + run: | + DIFF=$(git diff --name-only HEAD~1 HEAD 2>/dev/null || echo ".github/workflows/ci.yml") + echo "platform=$(echo "$DIFF" | grep -qE '^platform/|^\.github/workflows/ci\.yml$' && echo true || echo false)" >> "$GITHUB_OUTPUT" + echo "canvas=$(echo "$DIFF" | grep -qE '^canvas/|^\.github/workflows/ci\.yml$' && echo true || echo false)" >> "$GITHUB_OUTPUT" + echo "python=$(echo "$DIFF" | grep -qE '^workspace-template/|^\.github/workflows/ci\.yml$' && echo true || echo false)" >> "$GITHUB_OUTPUT" + echo "scripts=$(echo "$DIFF" | grep -qE '^tests/e2e/|^scripts/|^\.github/workflows/ci\.yml$' && echo true || echo false)" >> "$GITHUB_OUTPUT" platform-build: name: Platform (Go)