From c9729fbd269d72a20eb4a53846dd3cd7ae1dfc4a Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Thu, 19 Mar 2026 07:58:13 -0400 Subject: [PATCH] ci: use local git commands for path-filter action Passing a `token` value causes this action to use the GitHub REST API, which is subject to rate limits. We can chew through that allowance quickly (1,000 requests/hour) given that we run two of these actions per workflow run. `token` defaults to the workflow's token, but by setting it explicitly to an empty string, the action will instead use `git diff` to determine the modified paths. This works fine for our case because we're already running the checkout action, so we have an up-to-date repository view. This also has the advantage of working around the 300 files GitHub REST API limit for listing changed files. Ref: https://github.com/dorny/paths-filter --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e2388d88..0997080d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,7 +34,7 @@ jobs: - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 id: filter_every with: - token: ${{ secrets.GITHUB_TOKEN }} + token: "" predicate-quantifier: "every" filters: | code: @@ -43,7 +43,7 @@ jobs: - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 id: filter_any with: - token: ${{ secrets.GITHUB_TOKEN }} + token: "" filters: | macos: - '.swiftlint.yml'