From 8507d732309493bc5426203e5be76d34948b7975 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Sat, 16 May 2026 00:00:27 +0100 Subject: [PATCH] ci: fix code path filter so negation patterns actually exclude --- .github/workflows/pr_checks.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index e3312d8667..dfc0081d2d 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -17,16 +17,21 @@ jobs: name: Detect changes runs-on: ubuntu-latest outputs: - code: ${{ steps.filter.outputs.code }} + code: ${{ steps.code_filter.outputs.code }} + typecheck_self: ${{ steps.filter.outputs.typecheck_self }} webapp: ${{ steps.filter.outputs.webapp }} packages: ${{ steps.filter.outputs.packages }} internal: ${{ steps.filter.outputs.internal }} cli: ${{ steps.filter.outputs.cli }} sdk: ${{ steps.filter.outputs.sdk }} steps: + # `code` uses `every` semantics so the negation patterns actually subtract. + # With the default `some` quantifier, `**` matches every file and the + # subsequent `!...` patterns are no-ops (each pattern is OR'd, not AND'd). - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 - id: filter + id: code_filter with: + predicate-quantifier: every filters: | code: - '**' @@ -37,6 +42,11 @@ jobs: - '!references/**' - '!**/*.md' - '!**/.env.example' + - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 + id: filter + with: + filters: | + typecheck_self: - '.github/workflows/pr_checks.yml' - '.github/workflows/typecheck.yml' webapp: @@ -95,7 +105,7 @@ jobs: typecheck: needs: changes - if: needs.changes.outputs.code == 'true' + if: needs.changes.outputs.code == 'true' || needs.changes.outputs.typecheck_self == 'true' uses: ./.github/workflows/typecheck.yml webapp: