Skip to content

Commit

Permalink
feat: 7.1 linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosme Escobedo committed Jul 27, 2020
0 parents commit fe7b3cb
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM php:7.1-cli

LABEL "com.github.actions.name"="GA-PHPLint"
LABEL "com.github.actions.description"="Run PHP linter on PR"
LABEL "com.github.actions.icon"="aperture"
LABEL "com.github.actions.color"="blue"

LABEL version="0.0.1"
LABEL repository="https://github.com/justia/ga-phplint-7.1"
LABEL homepage="https://github.com/justia/ga-phplint-7.1"

RUN apt-get update && apt-get -y install zip unzip

RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/bin --filename=composer && chmod +x /usr/bin/composer

RUN mkdir /phplint && cd /phplint && composer require overtrue/phplint && ln -s /phplint/vendor/bin/phplint /usr/local/bin/phplint

COPY "entrypoint.sh" "/entrypoint.sh"
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GA-PHPLint7.1
PHP 7.1 linter.
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# action.yml
name: 'PHPLint'
description: 'Run PHP lint on PR'
outputs:
pass: # if code ok
description: 'Codes passes linter'
runs:
using: 'docker'
image: 'Dockerfile'
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

phplint ./

0 comments on commit fe7b3cb

Please sign in to comment.