File tree Expand file tree Collapse file tree 5 files changed +78
-0
lines changed Expand file tree Collapse file tree 5 files changed +78
-0
lines changed Original file line number Diff line number Diff line change
1
+ README.md
2
+ examples
Original file line number Diff line number Diff line change
1
+ FROM php:7.3-alpine
2
+
3
+ LABEL "com.github.actions.name" ="phpqa"
4
+ LABEL "com.github.actions.description" ="phpqa"
5
+ LABEL "com.github.actions.icon" ="check"
6
+ LABEL "com.github.actions.color" ="blue"
7
+
8
+ LABEL "repository" ="http://github.com/mickaelandrieu/phpqa-ga"
9
+ LABEL "homepage" ="http://github.com/actions"
10
+ LABEL "maintainer" =
"Mickaël Andrieu <[email protected] >"
11
+
12
+ RUN apk add --update libxslt-dev && \
13
+ docker-php-ext-install xsl
14
+
15
+ COPY --from=composer:1.8 /usr/bin/composer /usr/bin/composer
16
+ RUN COMPOSER_ALLOW_SUPERUSER=1 \
17
+ COMPOSER_HOME="/composer" \
18
+ composer global require --prefer-dist --no-progress --dev edgedesign/phpqa:1.20.0
19
+
20
+ RUN cd /composer/vendor/edgedesign/phpqa && \
21
+ composer update && \
22
+ composer remove phpunit/phpunit --dev --no-interaction && \
23
+ composer remove sebastian/phpcpd --no-interaction && \
24
+ composer require sebastian/phpcpd:~3.0 phploc/phploc:~4 phpunit/phpunit:~5.7 symfony/filesystem:~3 symfony/process:~3 symfony/finder:~3 && \
25
+ composer require jakub-onderka/php-parallel-lint jakub-onderka/php-console-highlighter phpstan/phpstan friendsofphp/php-cs-fixer:~2.2 vimeo/psalm sensiolabs/security-checker
26
+
27
+ ENV PATH /composer/vendor/bin:${PATH}
28
+
29
+ COPY ./entrypoint.sh /entrypoint.sh
30
+ RUN chmod +x /entrypoint.sh
31
+
32
+ ENTRYPOINT ["/entrypoint.sh" ]
33
+ CMD ["--help" ]
Original file line number Diff line number Diff line change
1
+ # GithubAction for PHPQA
2
+
3
+ ## Usage
4
+
5
+ You can use it as a Github Action like this:
6
+
7
+ _ .github/main.workflow_
8
+ ```
9
+ workflow "Main" {
10
+ on = "push"
11
+ resolves = ["PHPQA"]
12
+ }
13
+
14
+ action "PHPQA" {
15
+ uses = "docker://mickaelandrieu/phpqa-ga"
16
+ secrets = ["GITHUB_TOKEN"]
17
+ args = "--report --output=cli"
18
+ }
19
+ ```
20
+
21
+ ** You can copy/paste the .github folder (under examples/) to your project and thats all!**
22
+
23
+ ## Docker
24
+
25
+ A Docker-Image is built automatically and located here:
26
+ https://cloud.docker.com/u/mickaelandrieu/repository/docker/mickaelandrieu/phpqa-ga
27
+
28
+ You can run it in any given directory like this:
29
+
30
+ ` docker run --rm -it -w=/app -v ${PWD}:/app mickaelandrieu/phpqa-ga:latest tools `
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+
3
+ phpqa " $@ "
Original file line number Diff line number Diff line change
1
+ workflow "Main" {
2
+ on = " push"
3
+ resolves = [" PHPQA" ]
4
+ }
5
+
6
+ action "PHPQA" {
7
+ uses = " docker://mickaelandrieu/phpqa-ga"
8
+ secrets = [" GITHUB_TOKEN" ]
9
+ args = " --report --output cli"
10
+ }
You can’t perform that action at this time.
0 commit comments