From b7ac4545e5e5558b10940353cf5621d28bc04f18 Mon Sep 17 00:00:00 2001 From: Nick Wiegers Date: Wed, 29 Jan 2025 12:38:14 +0000 Subject: [PATCH] PHP Stan environment step added (#1) Reviewed-on: https://git.qlic.nl/workflows/quality/pulls/1 Reviewed-by: Jamie Schouten Co-authored-by: Nick Wiegers Co-committed-by: Nick Wiegers --- .gitea/workflows/quality.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/quality.yml b/.gitea/workflows/quality.yml index 0b27e28..5be7a96 100644 --- a/.gitea/workflows/quality.yml +++ b/.gitea/workflows/quality.yml @@ -9,6 +9,10 @@ on: required: false type: string default: ${{ vars.REGISTRY_PASSWORD }} + environment_path: + required: false + type: string + default: .env.phpstan jobs: quality: @@ -22,6 +26,12 @@ jobs: - name: Setup composer uses: https://git.qlic.nl/actions/setup-composer@v1 + - name: Copy ${{ inputs.environment_path }} to .env if it exists + run: | + if [ -f ${{ inputs.environment_path }} ]; then + cp ${{ inputs.environment_path }} .env + fi + - name: Run PHPStan run: ./vendor/bin/phpstan analyse --memory-limit=2G @@ -29,4 +39,4 @@ jobs: run: ./vendor/bin/php-cs-fixer fix --diff --dry-run - name: Run audit - run: composer audit + run: composer audit \ No newline at end of file