Checkouts Shopware and extension, optionally installs dependencies and sets up the database.
- Determines the Shopware version to use
- Sets up Shopware using the shopware/setup-shopware action
- Clones the extension (or downloads from an artifact)
- Handles both plugins and apps
- Installs extension dependencies
- Optionally installs Shopware, admin, and storefront dependencies
| Input | Description | Required | Default |
|---|---|---|---|
extensionName |
Your extension name | Yes | - |
extensionRef |
The branch/tag to checkout | No | - |
shopwareVersion |
Shopware version (.auto to auto-detect) |
No | .auto |
shopwareVersionFallback |
Fallback version | No | trunk |
shopware-repository |
The shopware repository to checkout | No | shopware/shopware |
shopware-github-token |
Token for checking out shopware repository | No | $GITHUB_TOKEN |
phpVersion |
PHP version to use | No | 8.2 |
mysqlVersion |
Mysql image to use or builtin |
No | builtin |
node-version |
Node.js version to use | No | 20.x |
npm-version |
NPM version to use | No | - |
composerRootVersion |
The COMPOSER_ROOT_VERSION | No | .auto |
dependencies |
JSON list defining dependencies | No | - |
extraRepositories |
Additional composer repositories | No | {} |
install |
Whether to install Shopware | No | - |
install-admin |
Whether to install admin npm deps | No | - |
install-storefront |
Whether to install storefront npm deps | No | - |
skip-js-build |
Skip js build step | No | false |
env |
Environment for Shopware | No | test |
keep-composer-tools |
Keep Shopware Composer tools | No | false |
extension-zip |
Artifact (extension zip) to download | No | - |
with-submodules |
Checkout with submodules | No | false |
allow-insecure-versions |
Allow older Shopware versions with vulnerabilities | No | false |
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/setup-extension@main
with:
extensionName: MyExtensionName
shopware-github-token: ${{ secrets.GITHUB_TOKEN }}jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/setup-extension@main
with:
extensionName: MyExtensionName
install: 'true'
install-admin: 'true'
shopware-github-token: ${{ secrets.GITHUB_TOKEN }}jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/setup-extension@main
with:
extensionName: MyExtensionName
install: 'true'
dependencies: |-
[
{"name": "SwagPlatformDemoData", "repo": "git@github.com:shopware/SwagPlatformDemoData.git"}
]
shopware-github-token: ${{ secrets.GITHUB_TOKEN }}jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/setup-extension@main
with:
extensionName: MyExtensionName
shopwareVersion: 6.5.x
shopware-github-token: ${{ secrets.GITHUB_TOKEN }}jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build zip
run: ./build-zip.sh
- uses: actions/upload-artifact@v4
with:
name: my-extension
path: my-extension.zip
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/setup-extension@main
with:
extensionName: MyExtensionName
extension-zip: my-extension
install: 'true'
shopware-github-token: ${{ secrets.GITHUB_TOKEN }}jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/setup-extension@main
with:
extensionName: MyExtensionName
extraRepositories: |-
{
"customRepo": {
"type": "vcs",
"url": "https://my-custom-repo.example.test/foo/bar.git"
}
}
shopware-github-token: ${{ secrets.GITHUB_TOKEN }}jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/setup-extension@main
with:
extensionName: MyExtensionName
install: 'true'
dependencies: |-
[
{"name": "MyPrivateExtension", "repo": "https://user:$MY_EXTENSION_TOKEN@gitlab.domain.com/org/my-extension.git"}
]
shopware-github-token: ${{ secrets.GITHUB_TOKEN }}- GitHub token with
repopermissions - For private dependencies, store tokens as repository secrets