Skip to content

Commit 750b565

Browse files
committed
Fix GHA CI
1 parent 2c3f0ab commit 750b565

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

.github/actions/ci-php-command-action/action.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ inputs:
1414
command:
1515
description: "Vendor Script Command, e.g. php vendor/bin/phpstan analyse --no-progress"
1616
required: false
17+
composer_command:
18+
description: "If command is provided, this is run after composer install and before the (optional) command."
19+
required: false
1720
runs:
1821
using: "composite"
1922
steps:
@@ -57,6 +60,19 @@ runs:
5760
composer:latest \
5861
composer install --no-interaction --no-progress --prefer-dist --optimize-autoloader
5962
63+
- name: Install Composer Dependencies
64+
if: ${{ inputs.composer_command != '' }}
65+
shell: bash
66+
run: |
67+
mkdir -p build/composer
68+
docker run --rm \
69+
--user="$(id -u):$(id -g)" \
70+
--pull=missing \
71+
--env COMPOSER_CACHE_DIR="build/composer" \
72+
--volume ${{ github.workspace }}:/app \
73+
composer:latest \
74+
${{ inputs.composer_command }}
75+
6076
- if: ${{ inputs.cache != '' }}
6177
name: Make Command Cache Directory
6278
shell: bash

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: ./.github/actions/ci-php-command-action
1616
with:
1717
display: Composer
18-
command: composer validate && composer audit
18+
composer_command: composer validate && composer audit
1919

2020
phpcs:
2121
name: PHP_CodeSniffer Code Style Check

0 commit comments

Comments
 (0)