Skip to content

Commit e6b4189

Browse files
committed
Add file diff
1 parent 5adc0da commit e6b4189

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ jobs:
99

1010
- name: Set changed files
1111
run: |
12-
echo "ALL_CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB ${{ github.base_ref }}..${{ github.sha }});"
13-
echo 'PKG_PHP_CHANGED_FILES=$(echo "$ALL_CHANGED_FILES" | grep -E "^pkg\/" | grep -E ".*?\.php$");'
12+
echo "PKG_PHP_CHANGED_FILES=$(./bin/git-find-changed-php-files.sh "${{ github.base_ref }}..${{ github.head_ref }}")"
1413
1514
- name: Get Composer Cache Directory
1615
id: composer-cache
@@ -44,8 +43,7 @@ jobs:
4443

4544
- name: Set changed files
4645
run: |
47-
echo "ALL_CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB ${{ github.base_ref }}..${{ github.sha }});"
48-
echo 'PKG_PHP_CHANGED_FILES=$(echo "$ALL_CHANGED_FILES" | grep -E "^pkg\/" | grep -E ".*?\.php$");'
46+
echo "PKG_PHP_CHANGED_FILES=$(./bin/git-find-changed-php-files.sh "${{ github.base_ref }}..${{ github.head_ref }}")"
4947
5048
- name: Get Composer Cache Directory
5149
id: composer-cache

bin/git-find-changed-php-files.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ IFS='
1212
ALL_CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "$1");
1313
PKG_PHP_CHANGED_FILES=$(echo "$ALL_CHANGED_FILES" | grep -E "^pkg\/" | grep -E ".*?\.php$");
1414

15-
echo "$ALL_PHP_CHANGED_FILES";
16-
#echo "$PKG_PHP_CHANGED_FILES";
15+
echo "$PKG_PHP_CHANGED_FILES";

0 commit comments

Comments
 (0)