4544: POC for using FrankenPHP behind Traefik #79
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/composer.yaml in | |
| # https://github.com/itk-dev/devops_itkdev-docker if need be. | |
| ### ### Composer | |
| ### | |
| ### Validates composer.json and checks that it's normalized. | |
| ### | |
| ### #### Assumptions | |
| ### | |
| ### 1. A docker compose service named `frankenphp` can be run and `composer` can be | |
| ### run inside the `frankenphp` service. | |
| ### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) | |
| ### is a dev requirement in `composer.json`: | |
| ### | |
| ### ``` shell | |
| ### docker compose run --rm frankenphp composer require --dev ergebnis/composer-normalize | |
| ### ``` | |
| ### | |
| ### Normalize `composer.json` by running | |
| ### | |
| ### ``` shell | |
| ### docker compose run --rm frankenphp composer normalize | |
| ### ``` | |
| name: Composer | |
| env: | |
| COMPOSE_USER: runner | |
| on: | |
| pull_request: | |
| paths: &paths | |
| - "composer.json" | |
| - "composer.lock" | |
| - "docker-compose.yml" | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| paths: *paths | |
| jobs: | |
| composer-validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Create docker network | |
| run: | | |
| docker network create frontend | |
| - run: | | |
| docker compose run --rm frankenphp composer validate --strict | |
| composer-normalized: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - 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 composer normalize --dry-run | |
| composer-audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Create docker network | |
| run: | | |
| docker network create frontend | |
| - run: | | |
| docker compose run --rm frankenphp composer audit --locked |