File tree Expand file tree Collapse file tree 3 files changed +101
-0
lines changed
Expand file tree Collapse file tree 3 files changed +101
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM phpstan/phpstan:0.12
2+
3+ LABEL version="1.0.0"
4+ LABEL repository="https://github.com/php-actions/phpstan"
5+ LABEL homepage="https://github.com/php-actions/phpstan"
6+ LABEL maintainer="Greg Bowler <greg.bowler@g105b.com>"
7+
8+ COPY entrypoint /usr/local/bin/entrypoint
9+ ENTRYPOINT ["/usr/local/bin/entrypoint" ]
Original file line number Diff line number Diff line change 1+ name : PHPStan (php-actions)
2+ description : PHP Static Analysis in Github Actions.
3+
4+ inputs :
5+ configuration :
6+ description : Configuration file location
7+ required : false
8+ level :
9+ description : Level of rule options - the higher the stricter
10+ required : false
11+ paths_file :
12+ description : Path to a file with a list of paths to run analysis on
13+ required : false
14+ autoload_file :
15+ description : Project's additional autoload file path
16+ required : false
17+ error_format :
18+ description : Format in which to print the result of the analysis
19+ required : false
20+ generate_baseline :
21+ description : Path to a file where the baseline should be saved
22+ required : false
23+ memory_limit :
24+ description : Memory limit for analysis
25+ required : false
26+ args :
27+ description : Extra arguments to pass to the phpstan binary
28+ required : false
29+
30+ runs :
31+ using : ' docker'
32+ image : ' Dockerfile'
33+ env :
34+ action_configuration : ${{ inputs.configuration }}
35+ action_level : ${{ inputs.level }}
36+ action_paths_file : ${{ inputs.paths_file }}
37+ action_autoload_file : ${{ inputs.autoload_file }}
38+ action_error_format : ${{ inputs.error_format }}
39+ action_generate_baseline : ${{ inputs.generate_baseline }}
40+ action_memory_limit : ${{ inputs.memory_limit }}
41+ action_args : ${{ inputs.args }}
42+
43+ branding :
44+ icon : ' check-square'
45+ color : ' purple'
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ command_string=" phpstan"
5+
6+ if [ -n " $action_configuration " ]
7+ then
8+ command_string=" $command_string --configuration='$action_configuration '"
9+ fi
10+
11+ if [ -n " $action_level " ]
12+ then
13+ command_string=" $command_string --level=$action_level "
14+ fi
15+
16+ if [ -n " $action_paths_file " ]
17+ then
18+ command_string=" $command_string --paths-file='$action_paths_file '"
19+ fi
20+
21+ if [ -n " $action_autoload_file " ]
22+ then
23+ command_string=" $command_string --autoload-file='$action_autoload_file '"
24+ fi
25+
26+ if [ -n " $action_error_format " ]
27+ then
28+ command_string=" $command_string --error-format=$action_error_format "
29+ fi
30+
31+ if [ -n " $action_generate_baseline " ]
32+ then
33+ command_string=" $command_string --generate-baseline=$action_generate_baseline "
34+ fi
35+
36+ if [ -n " $action_memory_limit " ]
37+ then
38+ command_string=" $command_string --memory-limit=$action_memory_limit "
39+ fi
40+
41+ if [ -n " $action_args " ]
42+ then
43+ command_string=" $command_string $action_args "
44+ fi
45+
46+ echo " Command: $command_string "
47+ eval " $command_string "
You can’t perform that action at this time.
0 commit comments