Skip to content

Commit

Permalink
Add PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Quetzacoalt91 committed Jul 6, 2020
1 parent b9b4a53 commit 3db8524
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 7.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM php:7.4

LABEL "com.github.actions.name"="PHP Syntax check"
LABEL "com.github.actions.description"="Run the native PHP linter"
LABEL "com.github.actions.icon"="check"
LABEL "com.github.actions.color"="blue"

LABEL "repository"="http://github.com/PrestaShop/github-action-php-lint"
LABEL "homepage"="http://github.com/actions"
LABEL "maintainer"="PrestaShop <[email protected]>"

ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
13 changes: 13 additions & 0 deletions 7.4/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# action.yml
name: 'Prestashop PHP 7.4 Linter'
description: 'PHP linter for 7.4'
inputs:
folder-to-exclude:
description: 'Folder to exclude'
required: false
default: '! -path "./vendor/*"'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.folder-to-exclude }}
3 changes: 3 additions & 0 deletions 7.4/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -l

sh -c "! (find . -type f -name \"*.php\" $1 -exec php -l -n {} \; | grep -v \"No syntax errors detected\")"

0 comments on commit 3db8524

Please sign in to comment.