4544: POC for using FrankenPHP behind Traefik #105
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Do not edit this file! Make a pull request on changing | |
| # github/workflows/twig.yaml in | |
| # https://github.com/itk-dev/devops_itkdev-docker if need be. | |
| ### ### Twig | |
| ### | |
| ### Validates Twig files | |
| ### | |
| ### #### Assumptions | |
| ### | |
| ### 1. A docker compose service named `frankenphp` can be run and `composer` can be | |
| ### run inside the `frankenphp` service. | |
| ### 2. [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) | |
| ### is a dev requirement in `composer.json`: | |
| ### | |
| ### ``` shell | |
| ### docker compose run --rm frankenphp composer require --dev vincentlanglet/twig-cs-fixer | |
| ### ``` | |
| ### | |
| ### 3. A [Configuration | |
| ### file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) | |
| ### in the root of the project defines which files to check and rules to use. | |
| name: Twig | |
| env: | |
| COMPOSE_USER: runner | |
| on: | |
| pull_request: | |
| paths: &paths | |
| - "**/*.twig" | |
| - "composer.json" | |
| - "composer.lock" | |
| - "docker-compose.yml" | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| paths: *paths | |
| jobs: | |
| twig-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Create docker network | |
| run: | | |
| docker network create frontend | |
| - run: | | |
| docker compose run --rm frankenphp composer install | |
| docker compose run --rm frankenphp vendor/bin/twig-cs-fixer lint |