--- /dev/null
+name: Build & Publish 1.5.x
+
+permissions:
+ contents: read
+
+on:
+ push:
+ branches:
+ - 'master'
+ paths:
+ - 'apache-1.5.x/**'
+ - 'fpm-1.5.x/**'
+ - 'fpm-alpine-1.5.x/**'
+
+ schedule:
+ # Rebuild images each monday early morning to ensure a fresh base OS.
+ - cron: "23 2 * * 1"
+ workflow_dispatch:
+
+jobs:
+ build-and-testvariants:
+ name: Build image variants and run tests
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ max-parallel: 10
+ matrix:
+ include:
+ - variant: 'apache-1.5.x'
+ test-files: 'apache-postgres'
+ docker-tag: roundcube/roundcubemail:1.5.x-apache,roundcube/roundcubemail:1.5.10-apache,roundcube/roundcubemail:latest-apache,roundcube/roundcubemail:latest
+ test-tag: roundcube/roundcubemail:latest-apache
+ - variant: 'fpm'
+ test-files: 'fpm-postgres-1.5.x'
+ docker-tag: roundcube/roundcubemail:1.5.x-fpm,roundcube/roundcubemail:1.5.10-fpm,roundcube/roundcubemail:latest-fpm
+ test-tag: roundcube/roundcubemail:latest-fpm
+ - variant: 'fpm-alpine-1.5.x'
+ test-files: 'fpm-postgres'
+ docker-tag: roundcube/roundcubemail:1.5.x-fpm-alpine,roundcube/roundcubemail:1.5.10-fpm-alpine,roundcube/roundcubemail:latest-fpm-alpine
+ test-tag: roundcube/roundcubemail:latest-fpm-alpine
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - name: Get docker hub username
+ id: creds
+ run: echo '::set-output name=username::${{ secrets.DOCKER_PULL_USERNAME }}'
+ - name: Login to Docker Hub
+ if: steps.creds.outputs.username != ''
+ uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
+ with:
+ username: ${{ secrets.DOCKER_PULL_USERNAME }}
+ password: ${{ secrets.DOCKER_PUSH_PASSWORD }}
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
+ with:
+ buildkitd-flags: --debug
+
+ - name: Build locally native image for "${{ matrix.variant }} for tests"
+ uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
+ with:
+ context: ${{ matrix.variant }}
+ push: load
+ tags: ${{ matrix.docker-tag }}
+
+ - name: Run tests
+ env:
+ # ROUNDCUBEMAIL_TEST_IMAGE: roundcube/roundcubemail:latest-${{matrix.variant}}
+ ROUNDCUBEMAIL_TEST_IMAGE: ${{ matrix.test-tag }}
+ HTTP_PORT: ${{ matrix.http-port || '80' }}
+ run: |
+ set -exu;
+ for testFile in ${{ join(matrix.test-files, ' ') }};
+ do
+ docker compose -f ./tests/docker-compose.test-${testFile}.yml \
+ up --exit-code-from=sut --abort-on-container-exit
+ done
+
+ - name: Build and push all images for "${{ matrix.variant }}"
+ uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
+ with:
+ context: ${{ matrix.variant }}
+ platforms: "linux/arm64,linux/arm/v6,linux/arm/v7,linux/386,linux/amd64"
+ push: true
+ tags: ${{ matrix.docker-tag }}