Skip to content

Commit

Permalink
Exclude build folder from lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Nov 27, 2024
1 parent 0846116 commit cd0703b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
- '**'
paths:
- '**.php'
- '!build/**'
pull_request:
types: [opened, edited, reopened, ready_for_review]
paths:
- '**.php'
- '!build/**'
workflow_dispatch:

concurrency:
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit cd0703b

Please sign in to comment.