From c4d88974a6290a46488b58c07494bb2e5ddd7735 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Tue, 6 Dec 2022 03:56:25 +0100 Subject: [PATCH] v8.0.26 --- .cirrus.yml | 50 ++++++++--- .github/workflows/release-8.0.yml | 145 ++++++++++++++++++++++++++++++ 8.0-fpm/Dockerfile | 15 ++-- 3 files changed, 190 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/release-8.0.yml diff --git a/.cirrus.yml b/.cirrus.yml index b47c3f4..c00231f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,4 +1,5 @@ task: + only_if: $CIRRUS_TAG == '' alias: build-linux-image timeout_in: 120m env: @@ -36,6 +37,26 @@ task: platform: linux cpu: 4 memory: 4G + - name: linux-armv6 + env: + LINUX_ARCH: armv6 + LINUX_PLATFORM: linux/arm/v6 + compute_engine_instance: + image_project: cirrus-images + image: family/docker-builder + platform: linux + cpu: 8 + memory: 8G + - name: linux-armv7 + env: + LINUX_ARCH: armv7 + LINUX_PLATFORM: linux/arm/v7 + compute_engine_instance: + image_project: cirrus-images + image: family/docker-builder + platform: linux + cpu: 8 + memory: 8G matrix: - env: PHP_VERSION: 7.4 @@ -53,30 +74,31 @@ task: semver_aliases_script: | if [[ -z "$CIRRUS_TAG" ]]; then echo "Script skipped!" else - SEMVER=${CIRRUS_TAG##*v} + SEMVER=${##*v} echo "SEMVER=${SEMVER}" >> $CIRRUS_ENV echo "SEMVER_MAJOR=${SEMVER%.*.*}" >> $CIRRUS_ENV echo "SEMVER_MINOR=${SEMVER%.*}" >> $CIRRUS_ENV fi - build_script: | - docker buildx build \ - --platform=${LINUX_PLATFORM} \ - -t joseluisq/php-fpm:${PHP_VERSION}-${LINUX_ARCH} \ - --cache-from=type=local,src=/tmp/.buildx-cache \ - --cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \ - -f ${PHP_VERSION}-fpm/Dockerfile . login_script: | if [[ "$PHP_VERSION" = "$SEMVER_MINOR" ]]; then docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD else echo "Script skipped!" fi - push_script: | - if [[ "$PHP_VERSION" = "$SEMVER_MINOR" ]]; then - docker push joseluisq/php-fpm:${PHP_VERSION}-${LINUX_ARCH} - else - echo "Script skipped!" - fi + build_script: | + push="" + ## if [[ "$PHP_VERSION" = "$SEMVER_MINOR" ]]; then + ## push="--push" + ## echo "Docker image will be built and pushed!" + ## else + ## echo "Push skipped!" + ## fi + docker buildx build \ + --platform=${LINUX_PLATFORM} $push \ + -t joseluisq/php-fpm:${PHP_VERSION}-${LINUX_ARCH} \ + --cache-from=type=local,src=/tmp/.buildx-cache \ + --cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \ + -f ${PHP_VERSION}-fpm/Dockerfile . cache_swap_script: | rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/.github/workflows/release-8.0.yml b/.github/workflows/release-8.0.yml new file mode 100644 index 0000000..39a4b68 --- /dev/null +++ b/.github/workflows/release-8.0.yml @@ -0,0 +1,145 @@ +name: release-v8.0 +on: + push: + tags: + - 'v8.0.[0-9]+' + - 'v8.0.[0-9]+-beta.[0-9]+' + +jobs: + docker-build: + runs-on: ubuntu-20.04 + strategy: + matrix: + build: + - amd64 + - 386 + - arm64 + - armv7 + - armv6 + include: + - build: amd64 + platform: linux/amd64 + - build: 386 + platform: linux/386 + - build: arm64 + platform: linux/arm64 + - build: armv6 + platform: linux/arm/v6 + - build: armv7 + platform: linux/arm/v7 + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: joseluisq/php-fpm + flavor: | + latest=false + tags: | + type=semver,pattern={{major}}.{{minor}}-${{ matrix.build }} + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + context: . + platforms: ${{ matrix.platform }} + file: 8.0-fpm/Dockerfile + tags: ${{ steps.meta.outputs.tags }} + + docker-manifest: + needs: docker-build + runs-on: ubuntu-20.04 + steps: + - name: Set envs + run: | + github_ref=${GITHUB_REF#refs/tags/} + SEMVER=${github_ref##*v} + echo "SEMVER=${SEMVER}" >> $GITHUB_ENV + echo "SEMVER_MAJOR=${SEMVER%.*.*}" >> $GITHUB_ENV + echo "SEMVER_MINOR=${SEMVER%.*}" >> $GITHUB_ENV + - + name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Push latest per version + run: | + docker manifest create \ + joseluisq/php-fpm:$SEMVER_MINOR \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-amd64 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-386 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-arm64 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-armv6 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-armv7 + docker manifest push joseluisq/php-fpm:$SEMVER_MINOR + # - + # name: Push latest (PHP 8.1+) + # run: | + # docker manifest create \ + # joseluisq/php-fpm:latest \ + # --amend joseluisq/php-fpm:$SEMVER_MINOR-amd64 \ + # --amend joseluisq/php-fpm:$SEMVER_MINOR-386 \ + # --amend joseluisq/php-fpm:$SEMVER_MINOR-arm64 \ + # --amend joseluisq/php-fpm:$SEMVER_MINOR-armv6 \ + # --amend joseluisq/php-fpm:$SEMVER_MINOR-armv7 + # docker manifest push joseluisq/php-fpm:latest + - + name: Pull all images + run: | + docker pull joseluisq/php-fpm:$SEMVER_MINOR-amd64 + docker pull joseluisq/php-fpm:$SEMVER_MINOR-386 + docker pull joseluisq/php-fpm:$SEMVER_MINOR-arm64 + docker pull joseluisq/php-fpm:$SEMVER_MINOR-armv6 + docker pull joseluisq/php-fpm:$SEMVER_MINOR-armv7 + - + name: Push semver alias + run: | + docker manifest create \ + joseluisq/php-fpm:${SEMVER} \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-amd64 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-386 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-arm64 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-armv6 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-armv7 + docker manifest push joseluisq/php-fpm:${SEMVER} + - + name: Push semver major alias + run: | + docker manifest create \ + joseluisq/php-fpm:${SEMVER_MAJOR} \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-amd64 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-386 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-arm64 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-armv6 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-armv7 + docker manifest push joseluisq/php-fpm:${SEMVER_MAJOR} + - + name: Push semver minor alias + run: | + docker manifest create \ + joseluisq/php-fpm:${SEMVER_MINOR} \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-amd64 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-386 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-arm64 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-armv6 \ + --amend joseluisq/php-fpm:$SEMVER_MINOR-armv7 + docker manifest push joseluisq/php-fpm:${SEMVER_MINOR} diff --git a/8.0-fpm/Dockerfile b/8.0-fpm/Dockerfile index 2650b20..373c33c 100644 --- a/8.0-fpm/Dockerfile +++ b/8.0-fpm/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.0.25-fpm-alpine3.16 +FROM php:8.0.26-fpm-alpine3.16 LABEL Maintainer="Jose Quintana " \ Description="PHP-FPM v8.0 with essential extensions on top of Alpine Linux." @@ -22,6 +22,7 @@ RUN set -eux \ icu-libs \ imagemagick \ imap \ + libexecinfo \ libffi \ libgmpxx \ libintl \ @@ -67,6 +68,7 @@ RUN set -eux \ imap-dev \ krb5-dev \ libc-dev \ + libexecinfo-dev \ libjpeg-turbo-dev \ libmcrypt-dev \ libpng-dev \ @@ -205,11 +207,12 @@ RUN set -eux \ && docker-php-ext-install -j$(nproc) pcntl \ && true \ \ -# Install phalcon - && pecl install phalcon \ - && docker-php-ext-enable phalcon \ - && true \ -\ +# TEMPORARILY DDISABLED: https://github.com/joseluisq/alpine-php-fpm/issues/16#issuecomment-1338648898 +# Install phalcon +# && pecl install phalcon \ +# && docker-php-ext-enable phalcon \ +# && true \ +# \ # Install pdo_pgsql && docker-php-ext-install -j$(nproc) pdo_pgsql \ && true \