From 2466cd942fed8c1f357c100644cd78708ce0c1d1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 3 Apr 2025 10:22:09 +0200 Subject: [PATCH] Update release.yml Signed-off-by: James Cole --- .github/workflows/release.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53794f3c14..0062a4ce93 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,7 +59,28 @@ jobs: git config user.email release@firefly-iii.org git config advice.addIgnoredFile false git config push.autoSetupRemote true - - name: crowdin action + - name: Lint PHP + run: | + php_lint_file() + { + local php_file="$1" + php -l "$php_file" &> /dev/null + if [ "$?" -ne 0 ] + then + echo -e "[FAIL] $php_file" + return 1 + fi + } + + export -f php_lint_file + + find . -path ./vendor -prune -o -name '*.php' | parallel -j 4 php_lint_file {} + + if [ "$?" -ne 0 ] + then + exit 1 + fi + - name: Crowdin action uses: crowdin/github-action@v2 with: upload_sources: true