Skip to content

Commit ae35874

Browse files
author
Greg Bowler
committed
Update action config
1 parent 7111157 commit ae35874

File tree

2 files changed

+45
-26
lines changed

2 files changed

+45
-26
lines changed

Dockerfile

Lines changed: 0 additions & 12 deletions
This file was deleted.

action.yml

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

44
inputs:
5+
version:
6+
description: What version of PHPStan to use
7+
default: latest
8+
required: false
9+
10+
php_version:
11+
description: What version of PHP to use
12+
default: latest
13+
required: false
14+
15+
php_extensions:
16+
description: Space separated list of extensions to configure with the PHP build
17+
required: false
18+
519
command:
620
description: The command to run (analyse [default], clear-result-cache, dump-deps, help, list, worker)
721
required: true
822
default: analyse
23+
924
path:
1025
description: Path(s) with source code to run analysis on
1126
required: true
27+
1228
configuration:
1329
description: Configuration file location
1430
required: false
31+
1532
level:
16-
description: Level of rule options - the higher the stricter
33+
description: Level of rule options - the higher, the stricter
1734
required: false
35+
1836
paths_file:
1937
description: Path to a file with a list of paths to run analysis on
2038
required: false
39+
2140
autoload_file:
2241
description: Project's additional autoload file path
2342
required: false
43+
2444
error_format:
2545
description: Format in which to print the result of the analysis
2646
required: false
47+
2748
generate_baseline:
2849
description: Path to a file where the baseline should be saved
2950
required: false
51+
3052
memory_limit:
3153
description: Memory limit for analysis
3254
required: false
55+
3356
args:
3457
description: Extra arguments to pass to the phpstan binary
3558
required: false
3659

3760
runs:
38-
using: 'docker'
39-
image: 'Dockerfile'
40-
env:
41-
action_command: ${{ inputs.command }}
42-
action_path: ${{ inputs.path }}
43-
action_configuration: ${{ inputs.configuration }}
44-
action_level: ${{ inputs.level }}
45-
action_paths_file: ${{ inputs.paths_file }}
46-
action_autoload_file: ${{ inputs.autoload_file }}
47-
action_error_format: ${{ inputs.error_format }}
48-
action_generate_baseline: ${{ inputs.generate_baseline }}
49-
action_memory_limit: ${{ inputs.memory_limit }}
50-
action_args: ${{ inputs.args }}
61+
using: "composite"
62+
steps:
63+
- env:
64+
ACTION_TOKEN: ${{ github.token }}
65+
ACTION_VERSION: ${{ inputs.version }}
66+
ACTION_PHP_VERSION: ${{ inputs.php_version }}
67+
ACTION_PHP_EXTENSIONS: ${{ inputs.php_extensions }}
68+
ACTION_COMMAND: ${{ inputs.command }}
69+
ACTION_PATH: ${{ inputs.path }}
70+
ACTION_CONFIGURATION: ${{ inputs.configuration }}
71+
ACTION_LEVEL: ${{ inputs.level }}
72+
ACTION_PATHS_FILE: ${{ inputs.paths_file }}
73+
ACTION_AUTOLOAD_FILE: ${{ inputs.autoload_file }}
74+
ACTION_ERROR_FORMAT: ${{ inputs.error_format }}
75+
ACTION_GENERATE_BASELINE: ${{ inputs.generate_baseline }}
76+
ACTION_MEMORY_LIMIT: ${{ inputs.memory_limit }}
77+
ACTION_ARGS: ${{ inputs.args }}
78+
id: phpstan_run
79+
run: bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/cc563958b37b62874df04de865e5e9c6d8bb93dd/php-build.bash) phpunit \
80+
&& ${{ github.action_path }}/phpunit-action.bash
81+
shell: bash
5182

5283
branding:
5384
icon: 'check-square'

0 commit comments

Comments
 (0)