Skip to content

Commit 8f0fa3d

Browse files
committed
feat: Add support for custom working directory
1 parent 4bbc46f commit 8f0fa3d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/actions/composer/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ inputs:
3030
description: Composer configuration as a JSON formatted object.
3131
required: false
3232
type: string
33+
WORKING_DIRECTORY:
34+
description: The working directory where to run the static analysis.
35+
default: '.'
36+
required: false
37+
type: string
3338

3439
secrets:
3540
COMPOSER_AUTH_JSON:
@@ -57,3 +62,4 @@ runs:
5762
if: ${{ inputs.INSTALL_AND_CACHE == 'true' }}
5863
with:
5964
composer-options: ${{ inputs.COMPOSER_ARGS }}
65+
working-directory: ${{ inputs.WORKING_DIRECTORY }}

.github/workflows/php-static-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535
defaults:
3636
run:
37+
shell: bash
3738
working-directory: ${{ inputs.WORKING_DIRECTORY }}
3839
env:
3940
COMPOSER_AUTH: '${{ secrets.COMPOSER_AUTH_JSON }}'
@@ -50,6 +51,7 @@ jobs:
5051
PHP_VERSION: ${{ inputs.PHP_VERSION }}
5152
PHP_TOOLS: "composer, cs2pr"
5253
COMPOSER_CONFIG: ${{ vars.COMPOSER_CONFIG_JSON }}
54+
WORKING_DIRECTORY: ${{ inputs.WORKING_DIRECTORY }}
5355

5456
- name: Get changed files
5557
id: changed-files

0 commit comments

Comments
 (0)