https://github.com/ebitkov/build-symfony
Github Action for building and testing Symfony apps
https://github.com/ebitkov/build-symfony
action github-action symfony
Last synced: about 1 month ago
JSON representation
Github Action for building and testing Symfony apps
- Host: GitHub
- URL: https://github.com/ebitkov/build-symfony
- Owner: ebitkov
- License: mit
- Created: 2023-11-11T11:42:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-16T09:16:53.000Z (2 months ago)
- Last Synced: 2026-04-16T11:14:37.235Z (2 months ago)
- Topics: action, github-action, symfony
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Build Symfony action
This action builds a Symfony app. You can optionally enable webpack asset building with NPM and testing with PHPUnit.
The build can be saved to the [GitHub Action Cache](https://github.com/actions/cache) and restored in other steps or
jobs.
## Usage
```yaml
- uses: ebitkov/build-symfony@v2
with:
# Whether to build webpack assets with NPM.
# Default: false
build-webpack-assets: ''
# Node.js version to use when building webpack assets.
# Default: '20'
node-version: ''
# Whether to save the build to cache for later reuse.
# Default: false
cache-build: ''
# Prefix used for the build cache key.
# github.run_id is always appended to the end.
# Default: 'symfony-build-'
cache-key-prefix: ''
# Additional Composer dependencies to install.
# Runs after the main installation.
# Accepts flex aliases and full package names with version constraints.
# Multiple dependencies can be defined as space-separated (e.g. 'twig symfony/doctrine-bundle')
# Default: null
composer-additional-dependencies: ''
# Additional options passed to Composer on installation.
# --no-interaction --no-progress --ansi are added automatically.
# Default: '--prefer-dist'
composer-options: ''
# GitHub Access Token.
# Passed to Composer for authentication.
# Default: ''
github-token: ''
# PHP extensions to install.
# String in CSV format.
# Default: 'mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, dom, filter, gd, json'
php-extensions: ''
# PHP version to use.
# Default: 8.2
php-version: ''
# Repository to fetch, passed to action/checkout.
# See https://github.com/actions/checkout for more details.
# Mainly used for internal testing.
# Default: ${{ github.repository }}
repository: ''
# Whether to run tests with PHPUnit.
# Installs PHPUnit automatically, if enabled.
# Default: false
run-tests: ''
# APP_ENV value.
# Default: 'dev'
symfony-environment: ''
# Whether to download Git-LFS files.
# Default: false
lfs: ''
```
### Reusing build files in other jobs
```yaml
jobs:
build:
# ...
outputs:
cache-key: ${{ steps.build.outputs.cache-key }}
steps:
- id: build
uses: ebitkov/build-symfony@v2
with:
cache-build: true
next_job:
needs: build
# ...
steps:
- uses: actions/cache/restore@v5
with:
key: ${{ needs.build.outputs.cache-key }}
path: ./
fail-on-cache-miss: true
- # next steps ...
```