Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions workflow-templates/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,29 @@ concurrency:
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read

outputs:
php: ${{ steps.changes.outputs.php }}

steps:
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: changes
continue-on-error: true
with:
filters: |
php:
- '*.php'
- '**/*.php'

matrix:
runs-on: ubuntu-latest-low
needs: changes
if: needs.changes.outputs.php != 'false'
outputs:
php-min: ${{ steps.versions.outputs.php-min }}
php-max: ${{ steps.versions.outputs.php-max }}
Expand All @@ -35,7 +56,8 @@ jobs:

php-lint:
runs-on: ubuntu-latest
needs: matrix
needs: [changes, matrix]
if: needs.changes.outputs.php != 'false'
strategy:
matrix:
php-versions: ['${{ needs.matrix.outputs.php-min }}', '${{ needs.matrix.outputs.php-max }}']
Expand Down Expand Up @@ -65,7 +87,7 @@ jobs:
permissions:
contents: none
runs-on: ubuntu-latest-low
needs: php-lint
needs: [changes, php-lint]

if: always()

Expand Down
Loading