Skip to content

Commit fb023ad

Browse files
author
Greg Bowler
committed
Pass command
1 parent 965d93c commit fb023ad

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: PHPStan (php-actions)
22
description: PHP Static Analysis in Github Actions.
33

44
inputs:
5+
command:
6+
description: The command to run (analyse [default], clear-result-cache, dump-deps, help, list, worker)
7+
required: true
8+
default: analyse
59
configuration:
610
description: Configuration file location
711
required: false
@@ -31,6 +35,7 @@ runs:
3135
using: 'docker'
3236
image: 'Dockerfile'
3337
env:
38+
action_command: ${{ inputs.command }}
3439
action_configuration: ${{ inputs.configuration }}
3540
action_level: ${{ inputs.level }}
3641
action_paths_file: ${{ inputs.paths_file }}

entrypoint

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ set -e
33

44
command_string="phpstan"
55

6+
if [ -n "$action_command" ]
7+
then
8+
command_string="$command_string $action_command"
9+
fi
10+
611
if [ -n "$action_configuration" ]
712
then
813
command_string="$command_string --configuration='$action_configuration'"

0 commit comments

Comments
 (0)