Skip to content

Commit 61385fe

Browse files
committed
setup-php action: configurable build-infection-path
1 parent c5fa738 commit 61385fe

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/actions/setup-php/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@ inputs:
88
description: 'PHP extensions'
99
required: false
1010
default: ''
11+
build-infection-path:
12+
description: 'Path to build-infection'
13+
require: false
14+
default: './build-infection'
1115
runs:
1216
using: "composite"
1317
steps:
1418
- name: Get infection/infection version
1519
id: infection_version
1620
shell: bash
1721
run: |
18-
version=$(jq -r '.packages[] | select(.name == "infection/infection") | .version' ./build-infection/composer.lock)
22+
version=$(jq -r '.packages[] | select(.name == "infection/infection") | .version' ${{ inputs.build-infection-path }}/composer.lock)
1923
echo "version=$version" >> "$GITHUB_OUTPUT"
2024
- name: "Install PHP"
2125
uses: "shivammathur/setup-php@v2"

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ jobs:
170170
- uses: ./.github/actions/setup-php
171171
with:
172172
php-version: "${{ matrix.php-version }}"
173+
build-infection-path: "./"
173174

174175
- name: "Install dependencies"
175176
run: "composer install --no-interaction --no-progress"

0 commit comments

Comments
 (0)