Docker builds #1390
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
| name: Docker builds | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 20 * * *' # 12:00 PT | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| artifacts: | |
| name: Artifact | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - v0.21.0 | |
| - dev | |
| build: | |
| - alpine | |
| - al2 | |
| - al2023 | |
| - arch | |
| - centos7/centos7 | |
| - centos8/centos8 | |
| - centos8/rocky8 | |
| - el9/el9 | |
| - debian/debian11 | |
| - ubuntu/ubuntu20 | |
| - ubuntu/ubuntu24 | |
| - ubuntu/ubuntu24-zend | |
| - litespeed/litespeed | |
| - litespeed/openlitespeed | |
| - mint21 | |
| - sle15 | |
| - php-cli | |
| - frankenphp | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 1s | |
| --health-timeout 1s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Build images | |
| run: | | |
| docker build --pull \ | |
| --tag ${{ matrix.build }}-${{ matrix.version }} \ | |
| --file docker/${{ matrix.build }}.Dockerfile \ | |
| --build-arg RELAY=${{ matrix.version }} . | |
| - name: Show configuration for Relay | |
| run: | | |
| docker run \ | |
| ${{ matrix.build }}-${{ matrix.version }} \ | |
| php --ri relay | |
| - name: Run quicktest | |
| run: | | |
| docker run \ | |
| --network="host" \ | |
| --volume $(pwd):/root/relay/ \ | |
| --env REDIS_HOST=$REDIS_HOST \ | |
| ${{ matrix.build }}-${{ matrix.version }} \ | |
| php /root/relay/.github/workflows/support/quicktest.php | |
| packages: | |
| name: Package | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| env: | |
| RELAY_VERSION: v0.21.0 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - apache2 | |
| - centos7/centos7-yum | |
| - centos8/centos8-dnf | |
| - el9/el9-dnf | |
| - debian/debian11-apt | |
| - debian/debian12-apt | |
| - ubuntu/ubuntu22-apt | |
| - litespeed/lsphp-apt | |
| - litespeed/lsphp-dnf | |
| - pie/pie-pinned | |
| - pie/pie-latest | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 1s | |
| --health-timeout 1s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Build images | |
| run: | | |
| docker build --pull \ | |
| --tag ${{ matrix.package }} \ | |
| --file docker/${{ matrix.package }}.Dockerfile \ | |
| ${{ matrix.package == 'pie/pie-latest' && format('--build-arg RELAY={0}', env.RELAY_VERSION) || '' }} . | |
| - name: Show configuration for Relay | |
| run: | | |
| docker run ${{ matrix.package }} bash -c "php --ri relay" | |
| - name: Verify Relay version | |
| if: ${{ matrix.package != 'pie/pie-pinned' }} | |
| run: | | |
| VERSION=$(docker run ${{ matrix.package }} bash -c "php -r \"echo phpversion('relay');\"") | |
| EXPECTED="${{ env.RELAY_VERSION }}" | |
| EXPECTED="${EXPECTED#v}" | |
| if [[ "$VERSION" != "$EXPECTED" ]]; then | |
| echo "::error::Expected version $EXPECTED but got: $VERSION" | |
| exit 1 | |
| fi | |
| echo "Relay version: $VERSION" | |
| docker run ${{ matrix.package }} php --version | |
| - name: Run quicktest | |
| run: | | |
| docker run \ | |
| --network="host" \ | |
| --volume $(pwd):/root/relay/ \ | |
| --env REDIS_HOST=$REDIS_HOST \ | |
| ${{ matrix.package }} \ | |
| bash -c "php /root/relay/.github/workflows/support/quicktest.php" |