6 Commits

Author SHA1 Message Date
aaa3bfde78 Merge pull request 'Add args for commands' (#11) from add-command-args into main
Reviewed-on: #11
2025-06-03 11:49:28 +00:00
4c4788aa6e Add args for commands 2025-06-03 11:54:54 +02:00
ff2e5816b0 feature/image (#9)
Reviewed-on: #9
Co-authored-by: Johan Rooijakkers <johan@qlic.nl>
Co-committed-by: Johan Rooijakkers <johan@qlic.nl>
2025-03-05 17:07:37 +00:00
ce508a66d5 change default image (#8)
Co-authored-by: Johan Rooijakkers <johan@qlic.nl>
Reviewed-on: #8
2025-03-05 17:01:55 +00:00
74bc98d49d Merge pull request 'can provide own image' (#7) from feature/image into main
Reviewed-on: #7
2025-03-05 16:40:14 +00:00
d459669371 can provide own image 2025-03-05 17:31:31 +01:00

View File

@ -1,6 +1,10 @@
on: on:
workflow_call: workflow_call:
inputs: inputs:
image:
required: false
type: string
default: git.qlic.nl/qlic/quality:php8.3
username: username:
required: false required: false
type: string type: string
@ -13,6 +17,18 @@ on:
required: false required: false
type: string type: string
default: '--verbose --prefer-dist --no-progress --no-interaction --optimize-autoloader --ignore-platform-reqs --no-scripts' default: '--verbose --prefer-dist --no-progress --no-interaction --optimize-autoloader --ignore-platform-reqs --no-scripts'
composer-audit-args:
required: false
type: string
default: '--abandoned fail'
phpstan-args:
required: false
type: string
default: '--memory-limit=2G'
phpcs-args:
required: false
type: string
default: '--diff --dry-run'
environment-path: environment-path:
required: false required: false
type: string type: string
@ -22,17 +38,11 @@ jobs:
quality: quality:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
container: container:
image: git.qlic.nl/qlic/quality:latest image: ${{ inputs.image }}
credentials: credentials:
username: ${{ inputs.username }} username: ${{ inputs.username }}
password: ${{ inputs.password }} password: ${{ inputs.password }}
steps: steps:
- name: Setup composer authentication
run: |
if [ -f ${{ secrets.COMPOSER_AUTH_JSON }} ]
cp ${{ secrets.COMPOSER_AUTH_JSON }} ~/.composer/auth.json
fi
- name: Setup composer - name: Setup composer
uses: https://git.qlic.nl/actions/setup-composer@v1 uses: https://git.qlic.nl/actions/setup-composer@v1
with: with:
@ -57,10 +67,10 @@ jobs:
fi fi
- name: Run PHPStan - name: Run PHPStan
run: ./vendor/bin/phpstan analyse --memory-limit=2G run: ./vendor/bin/phpstan analyse ${{ inputs.phpstan-args }}
- name: Run php cs fixer - name: Run php cs fixer
run: ./vendor/bin/php-cs-fixer fix --diff --dry-run run: ./vendor/bin/php-cs-fixer fix ${{ inputs.phpcs-args }}
- name: Run audit - name: Run audit
run: composer audit run: composer audit ${{ inputs.composer-audit-args }}