Skip to content

Commit

Permalink
Merge pull request #13 from Progi1984/supportPHP8.2
Browse files Browse the repository at this point in the history
Support for PHP 8.2
  • Loading branch information
Quetzacoalt91 authored Nov 24, 2022
2 parents e3477de + 3f8bcf3 commit f4bd7c8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM php:8.2-rc

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"]
18 changes: 18 additions & 0 deletions 8.2/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# action.yml
name: "Prestashop PHP 8.2 Linter"
description: "PHP linter for 8.2"
inputs:
folder-to-exclude:
description: "Folder to exclude"
required: false
default: '! -path "./vendor/*"'
working-directory:
description: "Working directory"
required: false
default: "./"
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.working-directory }}
- ${{ inputs.folder-to-exclude }}
5 changes: 5 additions & 0 deletions 8.2/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -l

cd $1

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

0 comments on commit f4bd7c8

Please sign in to comment.