-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9b4a53
commit 3db8524
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\")" |