diff --git a/action.yml b/action.yml index 232e0be..f1fc77d 100644 --- a/action.yml +++ b/action.yml @@ -43,7 +43,10 @@ inputs: relative_dir: description: If your composer file is not in the directory, you can specify the relative directory. required: false - + php_version: + description: The PHP version to run Psalm against + required: false + default: '' runs: using: 'docker' diff --git a/entrypoint.sh b/entrypoint.sh index cbf203b..fc7e497 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -16,6 +16,11 @@ if [ "$INPUT_SHOW_INFO" = "true" ]; then SHOW_INFO="--show-info=true" fi +PHP_VERSION="" +if [ -n "$INPUT_PHP_VERSION" ]; then + PHP_VERSION="--php-version=$INPUT_PHP_VERSION" +fi + if [ -n "$INPUT_SSH_KEY" ] then echo "::group::Keys setup for private repositories" @@ -81,4 +86,4 @@ else fi /composer/vendor/bin/psalm --version -/composer/vendor/bin/psalm --force-jit --output-format=github $TAINT_ANALYSIS $REPORT $SHOW_INFO $* +/composer/vendor/bin/psalm --force-jit --output-format=github $TAINT_ANALYSIS $REPORT $SHOW_INFO $PHP_VERSION $*