diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 697910d..f4b812a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,10 +5,12 @@ on: - '**' paths: - '**.php' + - '!build/**' pull_request: types: [opened, edited, reopened, ready_for_review] paths: - '**.php' + - '!build/**' workflow_dispatch: concurrency: @@ -24,7 +26,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - # User PHP 7.4 here for compatibility with the WordPress codesniffer rules. + # Use PHP 7.4 here for compatibility with the WordPress codesniffer rules. - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -36,6 +38,11 @@ jobs: with: SUFFIX_FILTER: .php + - name: Exclude build folder from diff + run: | + export GIT_DIFF=$(echo "$GIT_DIFF" | grep -v '^build/') + echo "Filtered diff: $GIT_DIFF" + - name: Get Composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT