77 steps :
88 - uses : actions/checkout@v2
99
10- - name : Set changed files
11- run : |
12- echo "PKG_PHP_CHANGED_FILES=$(./bin/git-find-changed-php-files.sh "origin/${{ github.base_ref }}..${{ github.head_ref }}")"
10+ - uses : technote-space/get-diff-action@v4
11+ with :
12+ PATTERNS : |
13+ pkg/**/*.php
1314
1415 - name : Get Composer Cache Directory
1516 id : composer-cache
@@ -33,17 +34,20 @@ jobs:
3334 - run : php ./bin/fix-symfony-version.php "4.3.*"
3435 - run : composer install --no-progress
3536 - run : sed -i 's/525568/16777471/' vendor/kwn/php-rdkafka-stubs/stubs/constants.php
36- - run : if [ ! -z "${PKG_PHP_CHANGED_FILES}" ]; then docker run --workdir="/mqdev" -v "`pwd`:/mqdev" --rm enqueue/dev:latest php -d memory_limit=1024M bin/phpstan analyse -l 1 -c phpstan.neon --error-format=github -- ${PKG_PHP_CHANGED_FILES[@]} ; fi
37+
38+ - run : docker run --workdir="/mqdev" -v "`pwd`:/mqdev" --rm enqueue/dev:latest php -d memory_limit=1024M bin/phpstan analyse -l 1 -c phpstan.neon --error-format=github -- ${{ env.GIT_DIFF_FILTERED }}
39+ if : env.GIT_DIFF_FILTERED
3740
3841 code_style_check :
3942 name : Code style check
4043 runs-on : ubuntu-latest
4144 steps :
4245 - uses : actions/checkout@v2
4346
44- - name : Set changed files
45- run : |
46- echo "PKG_PHP_CHANGED_FILES=$(./bin/git-find-changed-php-files.sh "origin/${{ github.base_ref }}..${{ github.head_ref }}")"
47+ - uses : technote-space/get-diff-action@v4
48+ with :
49+ PATTERNS : |
50+ pkg/**/*.php
4751
4852 - name : Get Composer Cache Directory
4953 id : composer-cache
6771 - run : php ./bin/fix-symfony-version.php "4.3.*"
6872 - run : composer install --no-progress
6973 - run : sed -i 's/525568/16777471/' vendor/kwn/php-rdkafka-stubs/stubs/constants.php
70- - run : if [ ! -z "${PKG_PHP_CHANGED_FILES}" ]; then ./bin/php-cs-fixer fix --config=.php_cs.php --no-interaction --dry-run --diff -v --path-mode=intersection -- ${PKG_PHP_CHANGED_FILES[@]} ; fi
74+
75+ - run : ./bin/php-cs-fixer fix --config=.php_cs.php --no-interaction --dry-run --diff -v --path-mode=intersection -- ${{ env.GIT_DIFF_FILTERED }}
76+ if : env.GIT_DIFF_FILTERED
7177
7278 tests :
7379 runs-on : ubuntu-latest
0 commit comments