From cd0703b6a2ed8de686b811c251538bd5f41fc8e9 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Wed, 27 Nov 2024 12:06:54 +0530 Subject: [PATCH] Exclude build folder from lint workflow --- .github/workflows/lint.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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