Compare commits
9 Commits
more-cache
...
main
Author | SHA1 | Date | |
---|---|---|---|
ff2e5816b0 | |||
ce508a66d5 | |||
74bc98d49d | |||
d459669371 | |||
a0f0fd27c6 | |||
66712a74ba | |||
38c236e286 | |||
1f81efa4ef | |||
2f73945f8f |
@ -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
|
||||||
@ -9,27 +13,45 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: ${{ vars.REGISTRY_PASSWORD }}
|
default: ${{ vars.REGISTRY_PASSWORD }}
|
||||||
environment_path:
|
composer-args:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: .env.phpstan
|
default: '--verbose --prefer-dist --no-progress --no-interaction --optimize-autoloader --ignore-platform-reqs --no-scripts'
|
||||||
|
environment-path:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: .env.example
|
||||||
|
|
||||||
jobs:
|
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
|
- name: Setup composer
|
||||||
uses: https://git.qlic.nl/actions/setup-composer@v1
|
uses: https://git.qlic.nl/actions/setup-composer@v1
|
||||||
|
with:
|
||||||
|
args: ${{ inputs.composer-args }}
|
||||||
|
|
||||||
- name: Copy ${{ inputs.environment_path }} to .env if it exists
|
- name: Cache PHPStan
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: .phpstan
|
||||||
|
key: phpstan-${{ hashFiles('composer.lock', 'phpstan.dist.neon') }}
|
||||||
|
|
||||||
|
- name: Cache PHP CS Fixer
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: .php-cs-fixer.cache
|
||||||
|
key: phpcs-${{ hashFiles('composer.lock', '.php-cs-fixer.dist.php') }}
|
||||||
|
|
||||||
|
- name: Copy ${{ inputs.environment-path }} to .env if it exists
|
||||||
run: |
|
run: |
|
||||||
if [ -f ${{ inputs.environment_path }} ]; then
|
if [ -f ${{ inputs.environment-path }} ]; then
|
||||||
cp ${{ inputs.environment_path }} .env
|
cp ${{ inputs.environment-path }} .env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Run PHPStan
|
- name: Run PHPStan
|
||||||
|
10
README.md
10
README.md
@ -10,7 +10,7 @@ jobs:
|
|||||||
uses: your-repo/.github/workflows/quality.yml@main
|
uses: your-repo/.github/workflows/quality.yml@main
|
||||||
```
|
```
|
||||||
|
|
||||||
### Secrets and Input Parameters
|
### Input Parameters
|
||||||
|
|
||||||
- **username** (optional):
|
- **username** (optional):
|
||||||
- **Type:** `string`
|
- **Type:** `string`
|
||||||
@ -22,6 +22,14 @@ jobs:
|
|||||||
- **Default:** `${{ vars.REGISTRY_PASSWORD }}`
|
- **Default:** `${{ vars.REGISTRY_PASSWORD }}`
|
||||||
- **Description:** Password for Docker registry authentication. If not provided, the workflow uses the default value from the `REGISTRY_PASSWORD` environment variable.
|
- **Description:** Password for Docker registry authentication. If not provided, the workflow uses the default value from the `REGISTRY_PASSWORD` environment variable.
|
||||||
|
|
||||||
|
- **composer-args** (optional):
|
||||||
|
- **Type:** `string`
|
||||||
|
- **Default:**
|
||||||
|
```bash
|
||||||
|
--verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs --no-scripts
|
||||||
|
```
|
||||||
|
- **Description:** Arguments passed to the Composer setup command for PHP dependency installation. These arguments can be customized based on specific requirements.
|
||||||
|
|
||||||
## Workflow Job: `quality`
|
## Workflow Job: `quality`
|
||||||
|
|
||||||
The `quality` job runs quality checks on the PHP codebase using the latest version of a Docker image specifically built for quality analysis.
|
The `quality` job runs quality checks on the PHP codebase using the latest version of a Docker image specifically built for quality analysis.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user