Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions extension-verifier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Validates and formats Shopware extensions using shopware-cli.
| `version` | The extension verifier version to use | No | `latest` |
| `action` | The action to run (`check` or `format`) | Yes | `check` |
| `check-against` | The version to check against | No | `highest` |
| `exclude` | Comma-separated list of tools to exclude from the check (e.g. `phpstan,eslint`) | No | *(none)* |

## Usage

Expand All @@ -39,6 +40,17 @@ jobs:
check-against: v6.6.0.0
```

### Exclude specific tools

```yaml
jobs:
verify:
uses: shopware/github-actions/extension-verifier@main
with:
action: check
exclude: phpstan,eslint
```

### Format extension (dry-run)

```yaml
Expand Down
14 changes: 13 additions & 1 deletion extension-verifier/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ inputs:
description: "The version to check against"
required: false
default: "highest"
exclude:
description: "Comma-separated list of tools to exclude from the check (e.g. phpstan,eslint)"
required: false
default: ""

runs:
using: "composite"
Expand All @@ -26,7 +30,15 @@ runs:
- name: Run verifier
if: inputs.action == 'check'
shell: bash
run: shopware-cli extension validate --full --check-against ${{ inputs.check-against }} .
env:
CHECK_AGAINST: ${{ inputs.check-against }}
EXCLUDE: ${{ inputs.exclude }}
run: |
ARGS=(--full --check-against "${CHECK_AGAINST}")
if [[ -n "${EXCLUDE}" ]]; then
ARGS+=("--exclude=${EXCLUDE}")
fi
shopware-cli extension validate "${ARGS[@]}" .
- name: Run formatter
if: inputs.action == 'format'
shell: bash
Expand Down
Loading