{"id":28438458,"url":"https://github.com/shopware/github-actions","last_synced_at":"2025-10-18T23:34:04.097Z","repository":{"id":216806537,"uuid":"742404068","full_name":"shopware/github-actions","owner":"shopware","description":"Reuseable GitHub Actions Workflows","archived":false,"fork":false,"pushed_at":"2025-06-13T12:07:10.000Z","size":239,"stargazers_count":14,"open_issues_count":6,"forks_count":7,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-06-13T13:23:49.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shopware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-12T11:59:36.000Z","updated_at":"2025-06-13T12:07:13.000Z","dependencies_parsed_at":"2024-06-17T18:40:15.860Z","dependency_job_id":"c5e378d4-cabb-4028-b4d3-e9a75ac9572b","html_url":"https://github.com/shopware/github-actions","commit_stats":null,"previous_names":["shopwarelabs/actions","shopware/github-actions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shopware/github-actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shopware%2Fgithub-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shopware%2Fgithub-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shopware%2Fgithub-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shopware%2Fgithub-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shopware","download_url":"https://codeload.github.com/shopware/github-actions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shopware%2Fgithub-actions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262468764,"owners_count":23316182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-06T01:07:25.706Z","updated_at":"2025-10-18T23:34:04.009Z","avatar_url":"https://github.com/shopware.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reusable GitHub Actions and Workflows for Shopware extensions\n\n## Workflows\n\n### Code Quality\n\n#### cs-fixer\n\nInstalls PHP-CS-Fixer and runs [PER Coding Style 2.0](https://www.php-fig.org/per/coding-style/) through the plugin.\n\n```yaml\njobs:\n    cs:\n        uses: shopware/github-actions/.github/workflows/cs-fixer.yml@main\n```\n\n#### phpstan\n\nInstalls Shopware 6, PHPStan and the extension, then runs PHPStan\n\n```yaml\njobs:\n    phpstan:\n        uses: shopware/github-actions/.github/workflows/phpstan.yml@main\n        with:\n          # Extension name\n          extensionName: MyExtensionName\n          # Run against Shopware version\n          shopwareVersion: 6.5.x\n```\n\nThe PHPStan check needs the file `phpstan.neon.dist` in the plugin root directory with the following content:\n\n```neon\nparameters:\n    # choose one of the available levels: https://phpstan.org/user-guide/rule-levels\n    level: max\n    # the paths are relative to the project root\n    # an additional path to check could be the tests directory\n    paths:\n        - src\n```\n\n#### admin-eslint\n\nRuns ESLint on the administration files of the plugin\n```yaml\njobs:\n    phpstan:\n        uses: shopware/github-actions/.github/workflows/admin-eslint.yml@main\n        with:\n          # Extension name\n          extensionName: MyExtensionName\n          # Run against Shopware version\n          shopwareVersion: 6.5.x\n```\n\n### Testing\n\n#### admin-jest\n\nRuns administration jest tests\n\n```yaml\njobs:\n    admin-jest:\n        uses: shopware/github-actions/.github/workflows/admin-jest.yml@main\n        with:\n            # Extension Name\n            extensionName: MyExtensionName\n            # Run against Shopware version\n            shopwareVersion: 6.5.x\n```\n\n#### phpunit\n\n```yaml\njobs:\n  phpunit:\n    uses: shopware/github-actions/.github/workflows/phpunit.yml@main\n    with:\n      # Extension Name\n      extensionName: MyExtensionName\n      # Run against Shopware version\n      shopwareVersion: 6.5.x\n```\n\nWith Code Coverage with [codecov](https://about.codecov.io/)\n\n```yaml\njobs:\n  phpunit:\n    uses: shopware/github-actions/.github/workflows/phpunit.yml@main\n    with:\n      extensionName: SwagPlatformDemoData\n      shopwareVersion: 6.5.x\n      uploadCoverage: true\n    secrets:\n      codecovToken: ${{ secrets.CODECOV_TOKEN }}\n```\n\n### Build Zip\n\nBuilds the extension zip and validates the zip using shopware-cli\n\n```yaml\njobs:\n  zip:\n    uses: shopware/github-actions/.github/workflows/build-zip.yml@main\n    with:\n      # Extension Name\n      extensionName: MyExtensionName\n```\n\n### Store Upload\n\nUpload the extension with the given Shopware account credentials into the account. It is recommended to use the `workflow_dispatch` event, so you have to manually trigger this from the Actions Tab.\n\n```yaml\nname: Release to Store\non:\n  workflow_dispatch:\njobs:\n  build:\n    uses: shopware/github-actions/.github/workflows/store-release.yml@main\n    with:\n      extensionName: ${{ github.event.repository.name }}\n    secrets:\n      accountUser: ${{ secrets.SHOPWARE_ACCOUNT_USER }}\n      accountPassword: ${{ secrets.SHOPWARE_ACCOUNT_PASSWORD }}\n      ghToken: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Extension Dependencies (For PHPUnit \u0026 phpstan)\n\nIf your extension has dependencies, you can specify them with the `dependencies` input and they will also be installed. The\ninput should a JSON array of objects containing the extension name and repository URL:\n\n```yaml\njobs:\n    phpstan:\n        uses: shopware/github-actions/.github/workflows/phpstan.yml@main\n        with:\n          extensionName: MyExtensionName\n          shopwareVersion: 6.5.x\n          dependencies: |-\n            [\n              {\"name\": \"SwagPlatformDemoData\", \"repo\": \"git@github.com:shopware/SwagPlatformDemoData.git\"}\n            ]\n```\n\nIf your extension is private, you can specify use variables in the repository URL. They will be replaced with a corresponding secret which you can pass using the `secrets.env` input.\nThe secret should be defined in your GitHub repository.\n\n```yaml\njobs:\n    phpstan:\n        uses: shopware/github-actions/.github/workflows/phpstan.yml@main\n        with:\n          extensionName: MyExtensionName\n          shopwareVersion: 6.5.x\n          dependencies: |-\n            [\n              {\"name\": \"MyPrivateExtension\", \"repo\": \"https://user:$MY_EXTENSION_TOKEN@gitlab.domain.com/org/my-extension.git\"}\n            ]\n          secrets:\n            env: MY_EXTENSION_TOKEN=${{ secrets.MY_EXTENSION_TOKEN }}\n```\n\n## Actions\n\n### Downstream\n\nTrigger a downstream pipeline in a project and wait for it to finish.\nJob fails if downstream fails.\n\nYou need to configure octo-sts in the downstream to allow your project to trigger a action or pass a token that has permissions to trigger the workflow.\n\nExample how to use the downstream action:\n```yaml\npermissions:\n  id-token: write\n\njobs:\n  downstream:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: shopware/github-actions/downstream@main\n        with:\n          repo: shopware/actions-test\n          workflow: test\n          ref: trunk\n```\n\nIn your downstream workflow you also need to use the upstream-connect action:\n\n```yaml\non:\n  workflow_dispatch:\n    inputs:\n      upstream_data:\n        required: false\n\njobs:\n  id:\n    runs-on: ubuntu-latest\n    steps:\n      - if: ${{ inputs.upstream_data }}\n        uses: shopware/github-actions/upstream-connect@main\n        with:\n          upstream_data: ${{ inputs.upstream_data }}\n```\n\nTo make it work with [octo-sts](https://github.com/octo-sts/app) you need to add a trust policy like this:\n\n```yaml\n# .github/chainguard/upstream.yaml\n\nissuer: https://token.actions.githubusercontent.com\nsubject: repo:shopware/shopware:ref:refs/heads/main\n# you can also use subject_pattern, if you want to use regex\n\nclaim_pattern:\n  # restrict to a specificy upstream workflow\n  job_workflow_ref: shopware/shopware/.github/workflows/downstream.yml@refs/heads/.*\n\npermissions:\n  actions: write\n\n```\n\nThis policy only allows the `main` ref with the `downstream.yml` workflow of the `shopware/shopware` repository to get a token with the `actions:write` permissions.\n\nYou should make this as specific as possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshopware%2Fgithub-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshopware%2Fgithub-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshopware%2Fgithub-actions/lists"}