Skip to content

Commit 44c80fe

Browse files
committed
Composite action: get Infection version from lockfile
1 parent 6dc005f commit 44c80fe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ inputs:
1111
runs:
1212
using: "composite"
1313
steps:
14+
- name: Get infection/infection version
15+
id: infection_version
16+
shell: bash
17+
run: |
18+
version=$(jq -r '.packages[] | select(.name == "infection/infection") | .version' ./build-infection/composer.lock)
19+
echo "version=$version" >> "$GITHUB_OUTPUT"
1420
- name: "Install PHP"
1521
uses: "shivammathur/setup-php@v2"
1622
with:
1723
coverage: "pcov"
1824
php-version: "${{ inputs.php-version }}"
1925
ini-file: development
2026
extensions: ${{ inputs.php-extensions }}
21-
tools: infection:0.31.8
27+
tools: infection:${{ steps.infection_version.outputs.version }}

0 commit comments

Comments
 (0)