From 05babc0091b9605577e876f21fdbd0b5bcbfb227 Mon Sep 17 00:00:00 2001 From: Wesley Bos Date: Mon, 29 Sep 2025 17:43:48 +0200 Subject: [PATCH 1/3] fix: required changes for ARM to build --- docker/toolbox/latest/Dockerfile.jinja2 | 1 + template/Dockerfile/images/php.jinja2 | 14 +++++++------- template/Dockerfile/tools.jinja2 | 8 ++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docker/toolbox/latest/Dockerfile.jinja2 b/docker/toolbox/latest/Dockerfile.jinja2 index 3b185c2cb..cd1b0c49f 100644 --- a/docker/toolbox/latest/Dockerfile.jinja2 +++ b/docker/toolbox/latest/Dockerfile.jinja2 @@ -1,4 +1,5 @@ {{ docker.fromOfficial("alpine") }} +ARG TARGETARCH RUN apk add --no-cache \ ca-certificates \ diff --git a/template/Dockerfile/images/php.jinja2 b/template/Dockerfile/images/php.jinja2 index 87f6501ae..32e5462a4 100644 --- a/template/Dockerfile/images/php.jinja2 +++ b/template/Dockerfile/images/php.jinja2 @@ -77,10 +77,10 @@ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ {%- endif %} - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ {%- if version != '8.4' %} && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ -{%- endif %} +{%- endif %} && docker-php-ext-install \ bcmath \ {%- if version == '8.0' or version == '8.1' or version == '8.2' or version == '8.3' or version == '8.4' %} @@ -248,7 +248,7 @@ icu-dev \ postgresql-dev \ libxml2-dev \ - ldb-dev \ + samba-dev \ pcre-dev \ libxslt-dev \ libzip-dev \ @@ -279,7 +279,7 @@ && docker-php-ext-configure ldap \ {%- if version != '8.4' %} && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ -{%- endif %} +{%- endif %} && docker-php-ext-install \ bcmath \ bz2 \ @@ -296,9 +296,9 @@ gettext \ ldap \ mysqli \ -{%- if version != '8.4' %} +{%- if version != '8.4' %} imap \ -{%- endif %} +{%- endif %} {%- if version != '7.4' and version != '8.0' and version != '8.1' and version != '8.2' and version != '8.3' and version != '8.4' %} hash \ {%- endif %} @@ -398,7 +398,7 @@ icu-dev \ postgresql-dev \ libxml2-dev \ - ldb-dev \ + samba-dev \ pcre-dev \ libxslt-dev \ libzip-dev \ diff --git a/template/Dockerfile/tools.jinja2 b/template/Dockerfile/tools.jinja2 index 458837ce9..b15ac5b8b 100644 --- a/template/Dockerfile/tools.jinja2 +++ b/template/Dockerfile/tools.jinja2 @@ -1,14 +1,14 @@ {% macro goreplace(path="/usr/local/bin", version="22.10.0") -%} ## Install go-replace - && wget -O "{{ path }}/go-replace" "https://github.com/webdevops/go-replace/releases/download/{{ version }}/go-replace.linux.amd64" \ + && wget -O "{{ path }}/go-replace" "https://github.com/webdevops/go-replace/releases/download/{{ version }}/go-replace.linux.$TARGETARCH" \ && chmod +x "{{ path }}/go-replace" \ && "{{ path }}/go-replace" --version {%- endmacro %} -{% macro gosu(path="/sbin", arch="amd64", version="1.10") -%} +{% macro gosu(path="/sbin", version="1.10") -%} # Install gosu - && wget -O "{{ path }}/gosu" "https://github.com/tianon/gosu/releases/download/{{ version }}/gosu-{{ arch }}" \ - && wget -O "/tmp/gosu.asc" "https://github.com/tianon/gosu/releases/download/{{ version }}/gosu-{{ arch }}.asc" \ + && wget -O "{{ path }}/gosu" "https://github.com/tianon/gosu/releases/download/{{ version }}/gosu-$TARGETARCH" \ + && wget -O "/tmp/gosu.asc" "https://github.com/tianon/gosu/releases/download/{{ version }}/gosu-$TARGETARCH.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /tmp/gosu.asc "{{ path }}/gosu" \ From 1e5f5a1c948ef9c2bad0f698b432ec6a1f737abd Mon Sep 17 00:00:00 2001 From: Wesley Bos Date: Mon, 29 Sep 2025 17:44:24 +0200 Subject: [PATCH 2/3] chore: resuling changes in Dockerfiles Can revert this commit as they should be auto-generated --- docker/php-official/8.4-alpine/Dockerfile | 8 ++++---- docker/php-official/8.4/Dockerfile | 2 +- docker/toolbox/latest/Dockerfile | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docker/php-official/8.4-alpine/Dockerfile b/docker/php-official/8.4-alpine/Dockerfile index f79d3d0f6..409e2c4c5 100644 --- a/docker/php-official/8.4-alpine/Dockerfile +++ b/docker/php-official/8.4-alpine/Dockerfile @@ -22,7 +22,7 @@ ENV APPLICATION_USER=application \ APPLICATION_PATH=/app \ APPLICATION_UID=1000 \ APPLICATION_GID=1000 -ENV PHP_SENDMAIL_PATH="/usr/sbin/sendmail -t -i" +ENV PHP_SENDMAIL_PATH="/usr/sbin/sendmail -t -i" ENV LD_PRELOAD="/usr/lib/preloadable_libiconv.so" ENV COMPOSER_VERSION="2" @@ -125,7 +125,7 @@ RUN set -x \ icu-dev \ postgresql-dev \ libxml2-dev \ - ldb-dev \ + samba-dev \ pcre-dev \ libxslt-dev \ libzip-dev \ @@ -148,7 +148,7 @@ RUN set -x \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ - && docker-php-ext-configure ldap \ + && docker-php-ext-configure ldap \ && docker-php-ext-install \ bcmath \ bz2 \ @@ -228,7 +228,7 @@ RUN set -x \ icu-dev \ postgresql-dev \ libxml2-dev \ - ldb-dev \ + samba-dev \ pcre-dev \ libxslt-dev \ libzip-dev \ diff --git a/docker/php-official/8.4/Dockerfile b/docker/php-official/8.4/Dockerfile index f79839c03..5700d6700 100644 --- a/docker/php-official/8.4/Dockerfile +++ b/docker/php-official/8.4/Dockerfile @@ -143,7 +143,7 @@ RUN set -x \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && docker-php-ext-install \ bcmath \ amqp \ diff --git a/docker/toolbox/latest/Dockerfile b/docker/toolbox/latest/Dockerfile index 780356b8d..530b6bf56 100644 --- a/docker/toolbox/latest/Dockerfile +++ b/docker/toolbox/latest/Dockerfile @@ -4,6 +4,7 @@ #+++++++++++++++++++++++++++++++++++++++ FROM alpine:latest +ARG TARGETARCH RUN apk add --no-cache \ ca-certificates \ @@ -29,13 +30,13 @@ RUN apk add --no-cache \ && wget -O /tmp/baselayout-install.sh https://raw.githubusercontent.com/webdevops/Docker-Image-Baselayout/master/install.sh \ && sh /tmp/baselayout-install.sh /baselayout \ ## Install go-replace - && wget -O "/baselayout/usr/local/bin/go-replace" "https://github.com/webdevops/go-replace/releases/download/22.10.0/go-replace.linux.amd64" \ + && wget -O "/baselayout/usr/local/bin/go-replace" "https://github.com/webdevops/go-replace/releases/download/22.10.0/go-replace.linux.$TARGETARCH" \ && chmod +x "/baselayout/usr/local/bin/go-replace" \ && "/baselayout/usr/local/bin/go-replace" --version \ && ln -s /baselayout/usr/local/bin/go-replace /usr/local/bin/ \ # Install gosu - && wget -O "/baselayout/sbin/gosu" "https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64" \ - && wget -O "/tmp/gosu.asc" "https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64.asc" \ + && wget -O "/baselayout/sbin/gosu" "https://github.com/tianon/gosu/releases/download/1.10/gosu-$TARGETARCH" \ + && wget -O "/tmp/gosu.asc" "https://github.com/tianon/gosu/releases/download/1.10/gosu-$TARGETARCH.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /tmp/gosu.asc "/baselayout/sbin/gosu" \ From a6843b642dd8e9e90045f7c55de792982500b987 Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Sat, 24 Jan 2026 11:51:31 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9C=A8=20add=20ARM=20into=20build=20pipe?= =?UTF-8?q?line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 5612 ++++++++++++----- build-local.sh | 42 +- ci/src/Commands/GithubCommand.php | 6 +- ci/src/GithubJobBuilder.php | 194 +- docker/dockerfile-build-env/latest/Dockerfile | 11 +- .../latest/Dockerfile.jinja2 | 11 +- docker/php-official/5.6/Dockerfile | 2 +- docker/php-official/7.0/Dockerfile | 2 +- docker/php-official/7.1/Dockerfile | 2 +- docker/php-official/7.2/Dockerfile | 2 +- docker/php-official/7.3/Dockerfile | 2 +- docker/php-official/7.4/Dockerfile | 2 +- docker/php-official/8.0/Dockerfile | 2 +- docker/php-official/8.1/Dockerfile | 2 +- docker/php-official/8.2/Dockerfile | 2 +- docker/php-official/8.3/Dockerfile | 2 +- docker/php-official/8.4-alpine/Dockerfile | 2 +- docker/php-official/8.4/Dockerfile | 2 +- docker/php-official/8.5/Dockerfile | 2 +- 19 files changed, 4327 insertions(+), 1575 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6fbd79660..fc6dcc97a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: 'Validate that template/* are used to generate Dockerfiles' run: |- @@ -27,29 +27,44 @@ jobs: docker run --rm -v $PWD:/app -w /app webdevops/php:8.4-alpine ci/console github:generate-ci git diff --exit-code --color=always apache_alpine: - name: 'webdevops/apache:alpine' - needs: - - base_alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/apache:alpine (${{ matrix.arch }})' + needs: base_alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/apache/alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/apache:alpine,webdevops/apache:alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/apache:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/apache:alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/apache:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/apache_spec.rb webdevops/apache:alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2FwYWNoZTphbHBpbmUiLCJET0NLRVJfVEFHIjoiYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IiIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -62,45 +77,82 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/apache:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + apache_alpine_publish: + name: 'webdevops/apache:alpine - Publish' + runs-on: ubuntu-latest + needs: apache_alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/apache/alpine - push: true - tags: 'ghcr.io/webdevops/apache:alpine,webdevops/apache:alpine' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/apache:alpine" \ + -t "ghcr.io/webdevops/apache:alpine" \ + "ghcr.io/webdevops/apache:sha-${{ github.sha }}-amd64-alpine" \ + "ghcr.io/webdevops/apache:sha-${{ github.sha }}-arm64-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 base-app_alpine: - name: 'webdevops/base-app:alpine' - needs: - - base_alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/base-app:alpine (${{ matrix.arch }})' + needs: base_alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/base-app/alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/base-app:alpine,webdevops/base-app:alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/base-app:alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/base-app_spec.rb webdevops/base-app:alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jhc2UtYXBwOmFscGluZSIsIkRPQ0tFUl9UQUciOiJhbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -108,7 +160,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/base-app:alpine --config base-app/test.yaml --config base-app/alpine/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-alpine --config base-app/test.yaml --config base-app/alpine/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -118,45 +170,82 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + base-app_alpine_publish: + name: 'webdevops/base-app:alpine - Publish' + runs-on: ubuntu-latest + needs: base-app_alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/base-app/alpine - push: true - tags: 'ghcr.io/webdevops/base-app:alpine,webdevops/base-app:alpine' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/base-app:alpine" \ + -t "ghcr.io/webdevops/base-app:alpine" \ + "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-amd64-alpine" \ + "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-arm64-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 base-app_ubuntu-22-04: - name: 'webdevops/base-app:ubuntu-22.04' - needs: - - base_ubuntu-22-04 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/base-app:ubuntu-22.04 (${{ matrix.arch }})' + needs: base_ubuntu-22-04_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/base-app/ubuntu-22.04 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/base-app:ubuntu-22.04,webdevops/base-app:ubuntu-22.04' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/base-app:ubuntu-22.04" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/base-app_spec.rb webdevops/base-app:ubuntu-22.04 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jhc2UtYXBwOnVidW50dS0yMi4wNCIsIkRPQ0tFUl9UQUciOiJ1YnVudHUtMjIuMDQiLCJPU19GQU1JTFkiOiJ1YnVudHUiLCJPU19WRVJTSU9OIjoiMjIuMDQiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -164,7 +253,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/base-app:ubuntu-22.04 --config base-app/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04 --config base-app/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -174,45 +263,84 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04' + base-app_ubuntu-22-04_publish: + name: 'webdevops/base-app:ubuntu-22.04 - Publish' + runs-on: ubuntu-latest + needs: base-app_ubuntu-22-04 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/base-app/ubuntu-22.04 - push: true - tags: 'ghcr.io/webdevops/base-app:ubuntu-22.04,webdevops/base-app:ubuntu-22.04' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/base-app:ubuntu-22.04" \ + -t "ghcr.io/webdevops/base-app:ubuntu-22.04" \ + -t "webdevops/base-app:latest" \ + -t "ghcr.io/webdevops/base-app:latest" \ + "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-amd64-ubuntu-22.04" \ + "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-arm64-ubuntu-22.04" && exit 0 + sleep $((i*i)) + done + exit 1 base_alpine: - name: 'webdevops/base:alpine' - needs: - - bootstrap_alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/base:alpine (${{ matrix.arch }})' + needs: bootstrap_alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/base/alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/base:alpine,webdevops/base:alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/base:alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/base_spec.rb webdevops/base:alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jhc2U6YWxwaW5lIiwiRE9DS0VSX1RBRyI6ImFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -220,7 +348,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/base:alpine --config base/test.yaml --config base/alpine/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine --config base/test.yaml --config base/alpine/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -230,45 +358,82 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + base_alpine_publish: + name: 'webdevops/base:alpine - Publish' + runs-on: ubuntu-latest + needs: base_alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/base/alpine - push: true - tags: 'ghcr.io/webdevops/base:alpine,webdevops/base:alpine' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/base:alpine" \ + -t "ghcr.io/webdevops/base:alpine" \ + "ghcr.io/webdevops/base:sha-${{ github.sha }}-amd64-alpine" \ + "ghcr.io/webdevops/base:sha-${{ github.sha }}-arm64-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 base_ubuntu-22-04: - name: 'webdevops/base:ubuntu-22.04' - needs: - - bootstrap_ubuntu-22-04 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/base:ubuntu-22.04 (${{ matrix.arch }})' + needs: bootstrap_ubuntu-22-04_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/base/ubuntu-22.04 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/base:ubuntu-22.04,webdevops/base:ubuntu-22.04' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/base:ubuntu-22.04" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/base_spec.rb webdevops/base:ubuntu-22.04 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jhc2U6dWJ1bnR1LTIyLjA0IiwiRE9DS0VSX1RBRyI6InVidW50dS0yMi4wNCIsIk9TX0ZBTUlMWSI6InVidW50dSIsIk9TX1ZFUlNJT04iOiIyMi4wNCIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -276,7 +441,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/base:ubuntu-22.04 --config base/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04 --config base/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -286,45 +451,84 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04' + base_ubuntu-22-04_publish: + name: 'webdevops/base:ubuntu-22.04 - Publish' + runs-on: ubuntu-latest + needs: base_ubuntu-22-04 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/base/ubuntu-22.04 - push: true - tags: 'ghcr.io/webdevops/base:ubuntu-22.04,webdevops/base:ubuntu-22.04' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/base:ubuntu-22.04" \ + -t "ghcr.io/webdevops/base:ubuntu-22.04" \ + -t "webdevops/base:latest" \ + -t "ghcr.io/webdevops/base:latest" \ + "ghcr.io/webdevops/base:sha-${{ github.sha }}-amd64-ubuntu-22.04" \ + "ghcr.io/webdevops/base:sha-${{ github.sha }}-arm64-ubuntu-22.04" && exit 0 + sleep $((i*i)) + done + exit 1 bootstrap_alpine: - name: 'webdevops/bootstrap:alpine' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/bootstrap:alpine (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/bootstrap/alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/bootstrap:alpine,webdevops/bootstrap:alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/bootstrap:alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/bootstrap_spec.rb webdevops/bootstrap:alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jvb3RzdHJhcDphbHBpbmUiLCJET0NLRVJfVEFHIjoiYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IiIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -332,7 +536,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/bootstrap:alpine --config bootstrap/test.yaml --config bootstrap/alpine/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-alpine --config bootstrap/test.yaml --config bootstrap/alpine/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -342,45 +546,82 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + bootstrap_alpine_publish: + name: 'webdevops/bootstrap:alpine - Publish' + runs-on: ubuntu-latest + needs: bootstrap_alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/bootstrap/alpine - push: true - tags: 'ghcr.io/webdevops/bootstrap:alpine,webdevops/bootstrap:alpine' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/bootstrap:alpine" \ + -t "ghcr.io/webdevops/bootstrap:alpine" \ + "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-amd64-alpine" \ + "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-arm64-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 bootstrap_ubuntu-22-04: - name: 'webdevops/bootstrap:ubuntu-22.04' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/bootstrap:ubuntu-22.04 (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/bootstrap/ubuntu-22.04 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/bootstrap:ubuntu-22.04,webdevops/bootstrap:ubuntu-22.04' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/bootstrap:ubuntu-22.04" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/bootstrap_spec.rb webdevops/bootstrap:ubuntu-22.04 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jvb3RzdHJhcDp1YnVudHUtMjIuMDQiLCJET0NLRVJfVEFHIjoidWJ1bnR1LTIyLjA0IiwiT1NfRkFNSUxZIjoidWJ1bnR1IiwiT1NfVkVSU0lPTiI6IjIyLjA0IiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -388,7 +629,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/bootstrap:ubuntu-22.04 --config bootstrap/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04 --config bootstrap/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -398,40 +639,79 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04' + bootstrap_ubuntu-22-04_publish: + name: 'webdevops/bootstrap:ubuntu-22.04 - Publish' + runs-on: ubuntu-latest + needs: bootstrap_ubuntu-22-04 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/bootstrap/ubuntu-22.04 - push: true - tags: 'ghcr.io/webdevops/bootstrap:ubuntu-22.04,webdevops/bootstrap:ubuntu-22.04' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/bootstrap:ubuntu-22.04" \ + -t "ghcr.io/webdevops/bootstrap:ubuntu-22.04" \ + -t "webdevops/bootstrap:latest" \ + -t "ghcr.io/webdevops/bootstrap:latest" \ + "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-amd64-ubuntu-22.04" \ + "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-arm64-ubuntu-22.04" && exit 0 + sleep $((i*i)) + done + exit 1 dockerfile-build-env_latest: - name: 'webdevops/dockerfile-build-env:latest' - needs: - - base-app_ubuntu-22-04 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/dockerfile-build-env:latest (${{ matrix.arch }})' + needs: base-app_ubuntu-22-04_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/dockerfile-build-env/latest + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/dockerfile-build-env:latest,webdevops/dockerfile-build-env:latest' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/dockerfile-build-env:sha-${{ github.sha }}-${{ matrix.arch }}-latest' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -441,45 +721,82 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/dockerfile-build-env:sha-${{ github.sha }}-${{ matrix.arch }}"-latest' + dockerfile-build-env_latest_publish: + name: 'webdevops/dockerfile-build-env:latest - Publish' + runs-on: ubuntu-latest + needs: dockerfile-build-env_latest + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/dockerfile-build-env/latest - push: true - tags: 'ghcr.io/webdevops/dockerfile-build-env:latest,webdevops/dockerfile-build-env:latest' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/dockerfile-build-env:latest" \ + -t "ghcr.io/webdevops/dockerfile-build-env:latest" \ + "ghcr.io/webdevops/dockerfile-build-env:sha-${{ github.sha }}-amd64-latest" \ + "ghcr.io/webdevops/dockerfile-build-env:sha-${{ github.sha }}-arm64-latest" && exit 0 + sleep $((i*i)) + done + exit 1 nginx_alpine: - name: 'webdevops/nginx:alpine' - needs: - - base_alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/nginx:alpine (${{ matrix.arch }})' + needs: base_alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/nginx/alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/nginx:alpine,webdevops/nginx:alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/nginx:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/nginx:alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/nginx_spec.rb webdevops/nginx:alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL25naW54OmFscGluZSIsIkRPQ0tFUl9UQUciOiJhbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -492,45 +809,82 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + nginx_alpine_publish: + name: 'webdevops/nginx:alpine - Publish' + runs-on: ubuntu-latest + needs: nginx_alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/nginx/alpine - push: true - tags: 'ghcr.io/webdevops/nginx:alpine,webdevops/nginx:alpine' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/nginx:alpine" \ + -t "ghcr.io/webdevops/nginx:alpine" \ + "ghcr.io/webdevops/nginx:sha-${{ github.sha }}-amd64-alpine" \ + "ghcr.io/webdevops/nginx:sha-${{ github.sha }}-arm64-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 php-apache-dev_8-1: - name: 'webdevops/php-apache-dev:8.1' - needs: - - php-apache_8-1 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache-dev:8.1 (${{ matrix.arch }})' + needs: php-apache_8-1_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.1 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.1,webdevops/php-apache-dev:8.1' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.1' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache-dev:8.1" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMSIsIkRPQ0tFUl9UQUciOiI4LjEiLCJPU19GQU1JTFkiOiJkZWJpYW4iLCJPU19WRVJTSU9OIjoiMTIiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -543,45 +897,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-apache-dev/8.1 - push: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.1,webdevops/php-apache-dev:8.1' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' php-apache-dev_8-1-alpine: - name: 'webdevops/php-apache-dev:8.1-alpine' - needs: - - php-apache_8-1-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache-dev:8.1-alpine (${{ matrix.arch }})' + needs: php-apache_8-1-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.1-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.1-alpine,webdevops/php-apache-dev:8.1-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache-dev:8.1-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMS1hbHBpbmUiLCJET0NLRVJfVEFHIjoiOC4xLWFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIzIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -594,45 +951,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' + php-apache-dev_8-1-alpine_publish: + name: 'webdevops/php-apache-dev:8.1-alpine - Publish' + runs-on: ubuntu-latest + needs: php-apache-dev_8-1-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache-dev:8.1-alpine" \ + -t "ghcr.io/webdevops/php-apache-dev:8.1-alpine" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.1-alpine" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache-dev_8-1_publish: + name: 'webdevops/php-apache-dev:8.1 - Publish' + runs-on: ubuntu-latest + needs: php-apache-dev_8-1 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-apache-dev/8.1-alpine - push: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.1-alpine,webdevops/php-apache-dev:8.1-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache-dev:8.1" \ + -t "ghcr.io/webdevops/php-apache-dev:8.1" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.1" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.1" && exit 0 + sleep $((i*i)) + done + exit 1 php-apache-dev_8-2: - name: 'webdevops/php-apache-dev:8.2' - needs: - - php-apache_8-2 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache-dev:8.2 (${{ matrix.arch }})' + needs: php-apache_8-2_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.2 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.2,webdevops/php-apache-dev:8.2' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache-dev:8.2" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMiIsIkRPQ0tFUl9UQUciOiI4LjIiLCJPU19GQU1JTFkiOiJkZWJpYW4iLCJPU19WRVJTSU9OIjoiMTIiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -645,45 +1073,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-apache-dev/8.2 - push: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.2,webdevops/php-apache-dev:8.2' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' php-apache-dev_8-2-alpine: - name: 'webdevops/php-apache-dev:8.2-alpine' - needs: - - php-apache_8-2-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache-dev:8.2-alpine (${{ matrix.arch }})' + needs: php-apache_8-2-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.2-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.2-alpine,webdevops/php-apache-dev:8.2-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache-dev:8.2-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMi1hbHBpbmUiLCJET0NLRVJfVEFHIjoiOC4yLWFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIzIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -696,45 +1127,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' + php-apache-dev_8-2-alpine_publish: + name: 'webdevops/php-apache-dev:8.2-alpine - Publish' + runs-on: ubuntu-latest + needs: php-apache-dev_8-2-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache-dev:8.2-alpine" \ + -t "ghcr.io/webdevops/php-apache-dev:8.2-alpine" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.2-alpine" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache-dev_8-2_publish: + name: 'webdevops/php-apache-dev:8.2 - Publish' + runs-on: ubuntu-latest + needs: php-apache-dev_8-2 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-apache-dev/8.2-alpine - push: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.2-alpine,webdevops/php-apache-dev:8.2-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache-dev:8.2" \ + -t "ghcr.io/webdevops/php-apache-dev:8.2" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.2" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.2" && exit 0 + sleep $((i*i)) + done + exit 1 php-apache-dev_8-3: - name: 'webdevops/php-apache-dev:8.3' - needs: - - php-apache_8-3 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache-dev:8.3 (${{ matrix.arch }})' + needs: php-apache_8-3_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.3 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.3,webdevops/php-apache-dev:8.3' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache-dev:8.3" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMyIsIkRPQ0tFUl9UQUciOiI4LjMiLCJPU19GQU1JTFkiOiJkZWJpYW4iLCJPU19WRVJTSU9OIjoiMTIiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -747,45 +1249,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-apache-dev/8.3 - push: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.3,webdevops/php-apache-dev:8.3' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' php-apache-dev_8-3-alpine: - name: 'webdevops/php-apache-dev:8.3-alpine' - needs: - - php-apache_8-3-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache-dev:8.3-alpine (${{ matrix.arch }})' + needs: php-apache_8-3-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.3-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.3-alpine,webdevops/php-apache-dev:8.3-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache-dev:8.3-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMy1hbHBpbmUiLCJET0NLRVJfVEFHIjoiOC4zLWFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIzIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -798,45 +1303,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' + php-apache-dev_8-3-alpine_publish: + name: 'webdevops/php-apache-dev:8.3-alpine - Publish' + runs-on: ubuntu-latest + needs: php-apache-dev_8-3-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache-dev:8.3-alpine" \ + -t "ghcr.io/webdevops/php-apache-dev:8.3-alpine" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.3-alpine" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache-dev_8-3_publish: + name: 'webdevops/php-apache-dev:8.3 - Publish' + runs-on: ubuntu-latest + needs: php-apache-dev_8-3 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-apache-dev/8.3-alpine - push: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.3-alpine,webdevops/php-apache-dev:8.3-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache-dev:8.3" \ + -t "ghcr.io/webdevops/php-apache-dev:8.3" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.3" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.3" && exit 0 + sleep $((i*i)) + done + exit 1 php-apache-dev_8-4: - name: 'webdevops/php-apache-dev:8.4' - needs: - - php-apache_8-4 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache-dev:8.4 (${{ matrix.arch }})' + needs: php-apache_8-4_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.4 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.4,webdevops/php-apache-dev:8.4' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache-dev:8.4" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguNCIsIkRPQ0tFUl9UQUciOiI4LjQiLCJPU19GQU1JTFkiOiJkZWJpYW4iLCJPU19WRVJTSU9OIjoiMTIiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -849,45 +1425,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-apache-dev/8.4 - push: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.4,webdevops/php-apache-dev:8.4' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' php-apache-dev_8-4-alpine: - name: 'webdevops/php-apache-dev:8.4-alpine' - needs: - - php-apache_8-4-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache-dev:8.4-alpine (${{ matrix.arch }})' + needs: php-apache_8-4-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.4-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.4-alpine,webdevops/php-apache-dev:8.4-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache-dev:8.4-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguNC1hbHBpbmUiLCJET0NLRVJfVEFHIjoiOC40LWFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIzIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -900,45 +1479,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' + php-apache-dev_8-4-alpine_publish: + name: 'webdevops/php-apache-dev:8.4-alpine - Publish' + runs-on: ubuntu-latest + needs: php-apache-dev_8-4-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache-dev:8.4-alpine" \ + -t "ghcr.io/webdevops/php-apache-dev:8.4-alpine" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.4-alpine" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache-dev_8-4_publish: + name: 'webdevops/php-apache-dev:8.4 - Publish' + runs-on: ubuntu-latest + needs: php-apache-dev_8-4 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-apache-dev/8.4-alpine - push: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.4-alpine,webdevops/php-apache-dev:8.4-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache-dev:8.4" \ + -t "ghcr.io/webdevops/php-apache-dev:8.4" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.4" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.4" && exit 0 + sleep $((i*i)) + done + exit 1 php-apache-dev_8-5: - name: 'webdevops/php-apache-dev:8.5' - needs: - - php-apache_8-5 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache-dev:8.5 (${{ matrix.arch }})' + needs: php-apache_8-5_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.5 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.5,webdevops/php-apache-dev:8.5' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache-dev:8.5" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguNSIsIkRPQ0tFUl9UQUciOiI4LjUiLCJPU19GQU1JTFkiOiJkZWJpYW4iLCJPU19WRVJTSU9OIjoiMTIiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -951,45 +1601,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-apache-dev/8.5 - push: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.5,webdevops/php-apache-dev:8.5' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' php-apache-dev_8-5-alpine: - name: 'webdevops/php-apache-dev:8.5-alpine' - needs: - - php-apache_8-5-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache-dev:8.5-alpine (${{ matrix.arch }})' + needs: php-apache_8-5-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.5-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.5-alpine,webdevops/php-apache-dev:8.5-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache-dev:8.5-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguNS1hbHBpbmUiLCJET0NLRVJfVEFHIjoiOC41LWFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIzIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -1002,45 +1655,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' + php-apache-dev_8-5-alpine_publish: + name: 'webdevops/php-apache-dev:8.5-alpine - Publish' + runs-on: ubuntu-latest + needs: php-apache-dev_8-5-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache-dev:8.5-alpine" \ + -t "ghcr.io/webdevops/php-apache-dev:8.5-alpine" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.5-alpine" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache-dev_8-5_publish: + name: 'webdevops/php-apache-dev:8.5 - Publish' + runs-on: ubuntu-latest + needs: php-apache-dev_8-5 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-apache-dev/8.5-alpine - push: true - tags: 'ghcr.io/webdevops/php-apache-dev:8.5-alpine,webdevops/php-apache-dev:8.5-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache-dev:8.5" \ + -t "ghcr.io/webdevops/php-apache-dev:8.5" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.5" \ + "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.5" && exit 0 + sleep $((i*i)) + done + exit 1 php-apache_8-1: - name: 'webdevops/php-apache:8.1' - needs: - - php_8-1 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache:8.1 (${{ matrix.arch }})' + needs: php_8-1_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache/8.1 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache:8.1,webdevops/php-apache:8.1' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.1' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache:8.1" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4xIiwiRE9DS0VSX1RBRyI6IjguMSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -1053,45 +1777,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-apache/8.1 - push: true - tags: 'ghcr.io/webdevops/php-apache:8.1,webdevops/php-apache:8.1' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' php-apache_8-1-alpine: - name: 'webdevops/php-apache:8.1-alpine' - needs: - - php_8-1-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache:8.1-alpine (${{ matrix.arch }})' + needs: php_8-1-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache/8.1-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache:8.1-alpine,webdevops/php-apache:8.1-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache:8.1-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4xLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjEtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -1104,45 +1831,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' + php-apache_8-1-alpine_publish: + name: 'webdevops/php-apache:8.1-alpine - Publish' + runs-on: ubuntu-latest + needs: php-apache_8-1-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache:8.1-alpine" \ + -t "ghcr.io/webdevops/php-apache:8.1-alpine" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.1-alpine" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache_8-1_publish: + name: 'webdevops/php-apache:8.1 - Publish' + runs-on: ubuntu-latest + needs: php-apache_8-1 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-apache/8.1-alpine - push: true - tags: 'ghcr.io/webdevops/php-apache:8.1-alpine,webdevops/php-apache:8.1-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache:8.1" \ + -t "ghcr.io/webdevops/php-apache:8.1" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.1" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.1" && exit 0 + sleep $((i*i)) + done + exit 1 php-apache_8-2: - name: 'webdevops/php-apache:8.2' - needs: - - php_8-2 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache:8.2 (${{ matrix.arch }})' + needs: php_8-2_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache/8.2 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache:8.2,webdevops/php-apache:8.2' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache:8.2" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4yIiwiRE9DS0VSX1RBRyI6IjguMiIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -1155,45 +1953,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-apache/8.2 - push: true - tags: 'ghcr.io/webdevops/php-apache:8.2,webdevops/php-apache:8.2' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' php-apache_8-2-alpine: - name: 'webdevops/php-apache:8.2-alpine' - needs: - - php_8-2-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache:8.2-alpine (${{ matrix.arch }})' + needs: php_8-2-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache/8.2-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache:8.2-alpine,webdevops/php-apache:8.2-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache:8.2-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4yLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjItYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -1206,45 +2007,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' + php-apache_8-2-alpine_publish: + name: 'webdevops/php-apache:8.2-alpine - Publish' + runs-on: ubuntu-latest + needs: php-apache_8-2-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache:8.2-alpine" \ + -t "ghcr.io/webdevops/php-apache:8.2-alpine" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.2-alpine" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache_8-2_publish: + name: 'webdevops/php-apache:8.2 - Publish' + runs-on: ubuntu-latest + needs: php-apache_8-2 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-apache/8.2-alpine - push: true - tags: 'ghcr.io/webdevops/php-apache:8.2-alpine,webdevops/php-apache:8.2-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache:8.2" \ + -t "ghcr.io/webdevops/php-apache:8.2" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.2" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.2" && exit 0 + sleep $((i*i)) + done + exit 1 php-apache_8-3: - name: 'webdevops/php-apache:8.3' - needs: - - php_8-3 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache:8.3 (${{ matrix.arch }})' + needs: php_8-3_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache/8.3 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache:8.3,webdevops/php-apache:8.3' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache:8.3" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4zIiwiRE9DS0VSX1RBRyI6IjguMyIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -1257,45 +2129,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-apache/8.3 - push: true - tags: 'ghcr.io/webdevops/php-apache:8.3,webdevops/php-apache:8.3' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' php-apache_8-3-alpine: - name: 'webdevops/php-apache:8.3-alpine' - needs: - - php_8-3-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache:8.3-alpine (${{ matrix.arch }})' + needs: php_8-3-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache/8.3-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache:8.3-alpine,webdevops/php-apache:8.3-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache:8.3-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4zLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjMtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -1308,50 +2183,52 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-apache/8.3-alpine - push: true - tags: 'ghcr.io/webdevops/php-apache:8.3-alpine,webdevops/php-apache:8.3-alpine' - platforms: linux/amd64 - php-apache_8-4: - name: 'webdevops/php-apache:8.4' - needs: - - php_8-4 + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' + php-apache_8-3-alpine_publish: + name: 'webdevops/php-apache:8.3-alpine - Publish' runs-on: ubuntu-latest - container: webdevops/dockerfile-build-env + needs: php-apache_8-3-alpine + if: "${{github.ref == 'refs/heads/master'}}" steps: - - - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' - uses: docker/build-push-action@v6 + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-apache/8.4 - load: true - tags: 'ghcr.io/webdevops/php-apache:8.4,webdevops/php-apache:8.4' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - - name: 'run serverspec' + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' run: |- - cd tests/serverspec - echo "FROM webdevops/php-apache:8.4" >> Dockerfile_test - echo "COPY conf/ /" >> Dockerfile_test - bundle install - bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC40IiwiRE9DS0VSX1RBRyI6IjguNCIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache:8.3-alpine" \ + -t "ghcr.io/webdevops/php-apache:8.3-alpine" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.3-alpine" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache_8-3_publish: + name: 'webdevops/php-apache:8.3 - Publish' + runs-on: ubuntu-latest + needs: php-apache_8-3 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 - - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' uses: docker/login-action@v3 with: @@ -1359,45 +2236,117 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache:8.3" \ + -t "ghcr.io/webdevops/php-apache:8.3" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.3" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.3" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache_8-4: + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache:8.4 (${{ matrix.arch }})' + needs: php_8-4_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' + container: webdevops/dockerfile-build-env + steps: + - + uses: actions/checkout@v6 + - + uses: docker/setup-buildx-action@v3 + - + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache/8.4 - push: true - tags: 'ghcr.io/webdevops/php-apache:8.4,webdevops/php-apache:8.4' - platforms: linux/amd64 + platforms: '${{ matrix.platform }}' + load: true + tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'run serverspec' + run: |- + cd tests/serverspec + echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test + echo "COPY conf/ /" >> Dockerfile_test + bundle install + bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC40IiwiRE9DS0VSX1RBRyI6IjguNCIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Push arch image' + if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' php-apache_8-4-alpine: - name: 'webdevops/php-apache:8.4-alpine' - needs: - - php_8-4-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache:8.4-alpine (${{ matrix.arch }})' + needs: php_8-4-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache/8.4-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache:8.4-alpine,webdevops/php-apache:8.4-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache:8.4-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC40LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjQtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -1410,45 +2359,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' + php-apache_8-4-alpine_publish: + name: 'webdevops/php-apache:8.4-alpine - Publish' + runs-on: ubuntu-latest + needs: php-apache_8-4-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache:8.4-alpine" \ + -t "ghcr.io/webdevops/php-apache:8.4-alpine" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.4-alpine" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache_8-4_publish: + name: 'webdevops/php-apache:8.4 - Publish' + runs-on: ubuntu-latest + needs: php-apache_8-4 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-apache/8.4-alpine - push: true - tags: 'ghcr.io/webdevops/php-apache:8.4-alpine,webdevops/php-apache:8.4-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache:8.4" \ + -t "ghcr.io/webdevops/php-apache:8.4" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.4" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.4" && exit 0 + sleep $((i*i)) + done + exit 1 php-apache_8-5: - name: 'webdevops/php-apache:8.5' - needs: - - php_8-5 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache:8.5 (${{ matrix.arch }})' + needs: php_8-5_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache/8.5 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache:8.5,webdevops/php-apache:8.5' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache:8.5" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC41IiwiRE9DS0VSX1RBRyI6IjguNSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -1461,45 +2481,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-apache/8.5 - push: true - tags: 'ghcr.io/webdevops/php-apache:8.5,webdevops/php-apache:8.5' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' php-apache_8-5-alpine: - name: 'webdevops/php-apache:8.5-alpine' - needs: - - php_8-5-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-apache:8.5-alpine (${{ matrix.arch }})' + needs: php_8-5-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-apache/8.5-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-apache:8.5-alpine,webdevops/php-apache:8.5-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-apache:8.5-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC41LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjUtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -1512,45 +2535,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' + php-apache_8-5-alpine_publish: + name: 'webdevops/php-apache:8.5-alpine - Publish' + runs-on: ubuntu-latest + needs: php-apache_8-5-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache:8.5-alpine" \ + -t "ghcr.io/webdevops/php-apache:8.5-alpine" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.5-alpine" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-apache_8-5_publish: + name: 'webdevops/php-apache:8.5 - Publish' + runs-on: ubuntu-latest + needs: php-apache_8-5 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-apache/8.5-alpine - push: true - tags: 'ghcr.io/webdevops/php-apache:8.5-alpine,webdevops/php-apache:8.5-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-apache:8.5" \ + -t "ghcr.io/webdevops/php-apache:8.5" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.5" \ + "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.5" && exit 0 + sleep $((i*i)) + done + exit 1 php-dev_8-1: - name: 'webdevops/php-dev:8.1' - needs: - - php_8-1 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-dev:8.1 (${{ matrix.arch }})' + needs: php_8-1_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-dev/8.1 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-dev:8.1,webdevops/php-dev:8.1' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.1' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-dev:8.1" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4xIiwiRE9DS0VSX1RBRyI6IjguMSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -1558,7 +2652,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-dev:8.1 --config php-dev/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.1 --config php-dev/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -1568,45 +2662,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-dev/8.1 - push: true - tags: 'ghcr.io/webdevops/php-dev:8.1,webdevops/php-dev:8.1' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' php-dev_8-1-alpine: - name: 'webdevops/php-dev:8.1-alpine' - needs: - - php_8-1-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-dev:8.1-alpine (${{ matrix.arch }})' + needs: php_8-1-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-dev/8.1-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-dev:8.1-alpine,webdevops/php-dev:8.1-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-dev:8.1-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4xLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjEtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -1614,7 +2711,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-dev:8.1-alpine --config php-dev/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine --config php-dev/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -1624,45 +2721,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' + php-dev_8-1-alpine_publish: + name: 'webdevops/php-dev:8.1-alpine - Publish' + runs-on: ubuntu-latest + needs: php-dev_8-1-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-dev:8.1-alpine" \ + -t "ghcr.io/webdevops/php-dev:8.1-alpine" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.1-alpine" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-dev_8-1_publish: + name: 'webdevops/php-dev:8.1 - Publish' + runs-on: ubuntu-latest + needs: php-dev_8-1 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-dev/8.1-alpine - push: true - tags: 'ghcr.io/webdevops/php-dev:8.1-alpine,webdevops/php-dev:8.1-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-dev:8.1" \ + -t "ghcr.io/webdevops/php-dev:8.1" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.1" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.1" && exit 0 + sleep $((i*i)) + done + exit 1 php-dev_8-2: - name: 'webdevops/php-dev:8.2' - needs: - - php_8-2 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-dev:8.2 (${{ matrix.arch }})' + needs: php_8-2_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-dev/8.2 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-dev:8.2,webdevops/php-dev:8.2' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-dev:8.2" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4yIiwiRE9DS0VSX1RBRyI6IjguMiIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -1670,7 +2838,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-dev:8.2 --config php-dev/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2 --config php-dev/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -1680,45 +2848,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-dev/8.2 - push: true - tags: 'ghcr.io/webdevops/php-dev:8.2,webdevops/php-dev:8.2' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' php-dev_8-2-alpine: - name: 'webdevops/php-dev:8.2-alpine' - needs: - - php_8-2-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-dev:8.2-alpine (${{ matrix.arch }})' + needs: php_8-2-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-dev/8.2-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-dev:8.2-alpine,webdevops/php-dev:8.2-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-dev:8.2-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4yLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjItYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -1726,7 +2897,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-dev:8.2-alpine --config php-dev/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine --config php-dev/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -1736,55 +2907,52 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' + php-dev_8-2-alpine_publish: + name: 'webdevops/php-dev:8.2-alpine - Publish' + runs-on: ubuntu-latest + needs: php-dev_8-2-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-dev/8.2-alpine - push: true - tags: 'ghcr.io/webdevops/php-dev:8.2-alpine,webdevops/php-dev:8.2-alpine' - platforms: linux/amd64 - php-dev_8-3: - name: 'webdevops/php-dev:8.3' - needs: - - php_8-3 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-dev:8.2-alpine" \ + -t "ghcr.io/webdevops/php-dev:8.2-alpine" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.2-alpine" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-dev_8-2_publish: + name: 'webdevops/php-dev:8.2 - Publish' runs-on: ubuntu-latest - container: webdevops/dockerfile-build-env + needs: php-dev_8-2 + if: "${{github.ref == 'refs/heads/master'}}" steps: - - - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' - uses: docker/build-push-action@v6 - with: - context: docker/php-dev/8.3 - load: true - tags: 'ghcr.io/webdevops/php-dev:8.3,webdevops/php-dev:8.3' - platforms: linux/amd64 - - - name: 'run serverspec' - run: |- - cd tests/serverspec - echo "FROM webdevops/php-dev:8.3" >> Dockerfile_test - echo "COPY conf/ /" >> Dockerfile_test - bundle install - bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4zIiwiRE9DS0VSX1RBRyI6IjguMyIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test - - - name: 'run structure-test' - run: |- - cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-dev:8.3 --config php-dev/test.yaml - - - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' uses: docker/login-action@v3 with: @@ -1792,53 +2960,71 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-dev/8.3 - push: true - tags: 'ghcr.io/webdevops/php-dev:8.3,webdevops/php-dev:8.3' - platforms: linux/amd64 - php-dev_8-3-alpine: - name: 'webdevops/php-dev:8.3-alpine' - needs: - - php_8-3-alpine - runs-on: ubuntu-latest + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-dev:8.2" \ + -t "ghcr.io/webdevops/php-dev:8.2" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.2" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.2" && exit 0 + sleep $((i*i)) + done + exit 1 + php-dev_8-3: + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-dev:8.3 (${{ matrix.arch }})' + needs: php_8-3_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: - context: docker/php-dev/8.3-alpine + context: docker/php-dev/8.3 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-dev:8.3-alpine,webdevops/php-dev:8.3-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-dev:8.3-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install - bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4zLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjMtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test + bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4zIiwiRE9DS0VSX1RBRyI6IjguMyIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test - name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-dev:8.3-alpine --config php-dev/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3 --config php-dev/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -1848,53 +3034,56 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-dev/8.3-alpine - push: true - tags: 'ghcr.io/webdevops/php-dev:8.3-alpine,webdevops/php-dev:8.3-alpine' - platforms: linux/amd64 - php-dev_8-4: - name: 'webdevops/php-dev:8.4' - needs: - - php_8-4 - runs-on: ubuntu-latest + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' + php-dev_8-3-alpine: + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-dev:8.3-alpine (${{ matrix.arch }})' + needs: php_8-3-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: - context: docker/php-dev/8.4 + context: docker/php-dev/8.3-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-dev:8.4,webdevops/php-dev:8.4' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-dev:8.4" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install - bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC40IiwiRE9DS0VSX1RBRyI6IjguNCIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test + bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4zLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjMtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test - name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-dev:8.4 --config php-dev/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine --config php-dev/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -1904,45 +3093,175 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' + php-dev_8-3-alpine_publish: + name: 'webdevops/php-dev:8.3-alpine - Publish' + runs-on: ubuntu-latest + needs: php-dev_8-3-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-dev:8.3-alpine" \ + -t "ghcr.io/webdevops/php-dev:8.3-alpine" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.3-alpine" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-dev_8-3_publish: + name: 'webdevops/php-dev:8.3 - Publish' + runs-on: ubuntu-latest + needs: php-dev_8-3 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-dev:8.3" \ + -t "ghcr.io/webdevops/php-dev:8.3" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.3" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.3" && exit 0 + sleep $((i*i)) + done + exit 1 + php-dev_8-4: + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-dev:8.4 (${{ matrix.arch }})' + needs: php_8-4_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' + container: webdevops/dockerfile-build-env + steps: + - + uses: actions/checkout@v6 + - + uses: docker/setup-buildx-action@v3 + - + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-dev/8.4 - push: true - tags: 'ghcr.io/webdevops/php-dev:8.4,webdevops/php-dev:8.4' - platforms: linux/amd64 + platforms: '${{ matrix.platform }}' + load: true + tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'run serverspec' + run: |- + cd tests/serverspec + echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test + echo "COPY conf/ /" >> Dockerfile_test + bundle install + bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC40IiwiRE9DS0VSX1RBRyI6IjguNCIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test + - + name: 'run structure-test' + run: |- + cd tests/structure-test + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4 --config php-dev/test.yaml + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Push arch image' + if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' php-dev_8-4-alpine: - name: 'webdevops/php-dev:8.4-alpine' - needs: - - php_8-4-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-dev:8.4-alpine (${{ matrix.arch }})' + needs: php_8-4-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-dev/8.4-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-dev:8.4-alpine,webdevops/php-dev:8.4-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-dev:8.4-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC40LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjQtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -1950,7 +3269,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-dev:8.4-alpine --config php-dev/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine --config php-dev/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -1960,45 +3279,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' + php-dev_8-4-alpine_publish: + name: 'webdevops/php-dev:8.4-alpine - Publish' + runs-on: ubuntu-latest + needs: php-dev_8-4-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-dev:8.4-alpine" \ + -t "ghcr.io/webdevops/php-dev:8.4-alpine" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.4-alpine" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-dev_8-4_publish: + name: 'webdevops/php-dev:8.4 - Publish' + runs-on: ubuntu-latest + needs: php-dev_8-4 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-dev/8.4-alpine - push: true - tags: 'ghcr.io/webdevops/php-dev:8.4-alpine,webdevops/php-dev:8.4-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-dev:8.4" \ + -t "ghcr.io/webdevops/php-dev:8.4" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.4" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.4" && exit 0 + sleep $((i*i)) + done + exit 1 php-dev_8-5: - name: 'webdevops/php-dev:8.5' - needs: - - php_8-5 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-dev:8.5 (${{ matrix.arch }})' + needs: php_8-5_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-dev/8.5 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-dev:8.5,webdevops/php-dev:8.5' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-dev:8.5" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC41IiwiRE9DS0VSX1RBRyI6IjguNSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -2006,7 +3396,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-dev:8.5 --config php-dev/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5 --config php-dev/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -2016,45 +3406,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-dev/8.5 - push: true - tags: 'ghcr.io/webdevops/php-dev:8.5,webdevops/php-dev:8.5' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' php-dev_8-5-alpine: - name: 'webdevops/php-dev:8.5-alpine' - needs: - - php_8-5-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-dev:8.5-alpine (${{ matrix.arch }})' + needs: php_8-5-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-dev/8.5-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-dev:8.5-alpine,webdevops/php-dev:8.5-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-dev:8.5-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC41LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjUtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -2062,7 +3455,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-dev:8.5-alpine --config php-dev/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine --config php-dev/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -2072,45 +3465,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' + php-dev_8-5-alpine_publish: + name: 'webdevops/php-dev:8.5-alpine - Publish' + runs-on: ubuntu-latest + needs: php-dev_8-5-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-dev:8.5-alpine" \ + -t "ghcr.io/webdevops/php-dev:8.5-alpine" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.5-alpine" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-dev_8-5_publish: + name: 'webdevops/php-dev:8.5 - Publish' + runs-on: ubuntu-latest + needs: php-dev_8-5 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-dev/8.5-alpine - push: true - tags: 'ghcr.io/webdevops/php-dev:8.5-alpine,webdevops/php-dev:8.5-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-dev:8.5" \ + -t "ghcr.io/webdevops/php-dev:8.5" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.5" \ + "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.5" && exit 0 + sleep $((i*i)) + done + exit 1 php-nginx-dev_8-1: - name: 'webdevops/php-nginx-dev:8.1' - needs: - - php-nginx_8-1 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx-dev:8.1 (${{ matrix.arch }})' + needs: php-nginx_8-1_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.1 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.1,webdevops/php-nginx-dev:8.1' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.1' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx-dev:8.1" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4xIiwiRE9DS0VSX1RBRyI6IjguMSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -2123,45 +3587,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-nginx-dev/8.1 - push: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.1,webdevops/php-nginx-dev:8.1' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' php-nginx-dev_8-1-alpine: - name: 'webdevops/php-nginx-dev:8.1-alpine' - needs: - - php-nginx_8-1-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx-dev:8.1-alpine (${{ matrix.arch }})' + needs: php-nginx_8-1-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.1-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.1-alpine,webdevops/php-nginx-dev:8.1-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx-dev:8.1-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4xLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjEtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -2174,45 +3641,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' + php-nginx-dev_8-1-alpine_publish: + name: 'webdevops/php-nginx-dev:8.1-alpine - Publish' + runs-on: ubuntu-latest + needs: php-nginx-dev_8-1-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx-dev:8.1-alpine" \ + -t "ghcr.io/webdevops/php-nginx-dev:8.1-alpine" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.1-alpine" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-nginx-dev_8-1_publish: + name: 'webdevops/php-nginx-dev:8.1 - Publish' + runs-on: ubuntu-latest + needs: php-nginx-dev_8-1 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-nginx-dev/8.1-alpine - push: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.1-alpine,webdevops/php-nginx-dev:8.1-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx-dev:8.1" \ + -t "ghcr.io/webdevops/php-nginx-dev:8.1" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.1" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.1" && exit 0 + sleep $((i*i)) + done + exit 1 php-nginx-dev_8-2: - name: 'webdevops/php-nginx-dev:8.2' - needs: - - php-nginx_8-2 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx-dev:8.2 (${{ matrix.arch }})' + needs: php-nginx_8-2_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.2 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.2,webdevops/php-nginx-dev:8.2' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx-dev:8.2" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4yIiwiRE9DS0VSX1RBRyI6IjguMiIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -2225,45 +3763,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-nginx-dev/8.2 - push: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.2,webdevops/php-nginx-dev:8.2' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' php-nginx-dev_8-2-alpine: - name: 'webdevops/php-nginx-dev:8.2-alpine' - needs: - - php-nginx_8-2-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx-dev:8.2-alpine (${{ matrix.arch }})' + needs: php-nginx_8-2-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.2-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.2-alpine,webdevops/php-nginx-dev:8.2-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx-dev:8.2-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4yLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjItYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -2276,45 +3817,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' + php-nginx-dev_8-2-alpine_publish: + name: 'webdevops/php-nginx-dev:8.2-alpine - Publish' + runs-on: ubuntu-latest + needs: php-nginx-dev_8-2-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx-dev:8.2-alpine" \ + -t "ghcr.io/webdevops/php-nginx-dev:8.2-alpine" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.2-alpine" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-nginx-dev_8-2_publish: + name: 'webdevops/php-nginx-dev:8.2 - Publish' + runs-on: ubuntu-latest + needs: php-nginx-dev_8-2 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-nginx-dev/8.2-alpine - push: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.2-alpine,webdevops/php-nginx-dev:8.2-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx-dev:8.2" \ + -t "ghcr.io/webdevops/php-nginx-dev:8.2" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.2" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.2" && exit 0 + sleep $((i*i)) + done + exit 1 php-nginx-dev_8-3: - name: 'webdevops/php-nginx-dev:8.3' - needs: - - php-nginx_8-3 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx-dev:8.3 (${{ matrix.arch }})' + needs: php-nginx_8-3_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.3 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.3,webdevops/php-nginx-dev:8.3' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx-dev:8.3" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4zIiwiRE9DS0VSX1RBRyI6IjguMyIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -2327,45 +3939,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-nginx-dev/8.3 - push: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.3,webdevops/php-nginx-dev:8.3' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' php-nginx-dev_8-3-alpine: - name: 'webdevops/php-nginx-dev:8.3-alpine' - needs: - - php-nginx_8-3-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx-dev:8.3-alpine (${{ matrix.arch }})' + needs: php-nginx_8-3-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.3-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.3-alpine,webdevops/php-nginx-dev:8.3-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx-dev:8.3-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4zLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjMtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -2378,45 +3993,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' + php-nginx-dev_8-3-alpine_publish: + name: 'webdevops/php-nginx-dev:8.3-alpine - Publish' + runs-on: ubuntu-latest + needs: php-nginx-dev_8-3-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx-dev:8.3-alpine" \ + -t "ghcr.io/webdevops/php-nginx-dev:8.3-alpine" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.3-alpine" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-nginx-dev_8-3_publish: + name: 'webdevops/php-nginx-dev:8.3 - Publish' + runs-on: ubuntu-latest + needs: php-nginx-dev_8-3 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-nginx-dev/8.3-alpine - push: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.3-alpine,webdevops/php-nginx-dev:8.3-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx-dev:8.3" \ + -t "ghcr.io/webdevops/php-nginx-dev:8.3" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.3" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.3" && exit 0 + sleep $((i*i)) + done + exit 1 php-nginx-dev_8-4: - name: 'webdevops/php-nginx-dev:8.4' - needs: - - php-nginx_8-4 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx-dev:8.4 (${{ matrix.arch }})' + needs: php-nginx_8-4_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.4 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.4,webdevops/php-nginx-dev:8.4' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx-dev:8.4" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC40IiwiRE9DS0VSX1RBRyI6IjguNCIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -2429,45 +4115,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-nginx-dev/8.4 - push: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.4,webdevops/php-nginx-dev:8.4' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' php-nginx-dev_8-4-alpine: - name: 'webdevops/php-nginx-dev:8.4-alpine' - needs: - - php-nginx_8-4-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx-dev:8.4-alpine (${{ matrix.arch }})' + needs: php-nginx_8-4-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.4-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.4-alpine,webdevops/php-nginx-dev:8.4-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx-dev:8.4-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC40LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjQtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -2480,45 +4169,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' + php-nginx-dev_8-4-alpine_publish: + name: 'webdevops/php-nginx-dev:8.4-alpine - Publish' + runs-on: ubuntu-latest + needs: php-nginx-dev_8-4-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx-dev:8.4-alpine" \ + -t "ghcr.io/webdevops/php-nginx-dev:8.4-alpine" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.4-alpine" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-nginx-dev_8-4_publish: + name: 'webdevops/php-nginx-dev:8.4 - Publish' + runs-on: ubuntu-latest + needs: php-nginx-dev_8-4 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-nginx-dev/8.4-alpine - push: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.4-alpine,webdevops/php-nginx-dev:8.4-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx-dev:8.4" \ + -t "ghcr.io/webdevops/php-nginx-dev:8.4" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.4" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.4" && exit 0 + sleep $((i*i)) + done + exit 1 php-nginx-dev_8-5: - name: 'webdevops/php-nginx-dev:8.5' - needs: - - php-nginx_8-5 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx-dev:8.5 (${{ matrix.arch }})' + needs: php-nginx_8-5_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.5 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.5,webdevops/php-nginx-dev:8.5' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx-dev:8.5" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC41IiwiRE9DS0VSX1RBRyI6IjguNSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -2531,45 +4291,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-nginx-dev/8.5 - push: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.5,webdevops/php-nginx-dev:8.5' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' php-nginx-dev_8-5-alpine: - name: 'webdevops/php-nginx-dev:8.5-alpine' - needs: - - php-nginx_8-5-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx-dev:8.5-alpine (${{ matrix.arch }})' + needs: php-nginx_8-5-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.5-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.5-alpine,webdevops/php-nginx-dev:8.5-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx-dev:8.5-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC41LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjUtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test @@ -2582,45 +4345,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' + php-nginx-dev_8-5-alpine_publish: + name: 'webdevops/php-nginx-dev:8.5-alpine - Publish' + runs-on: ubuntu-latest + needs: php-nginx-dev_8-5-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx-dev:8.5-alpine" \ + -t "ghcr.io/webdevops/php-nginx-dev:8.5-alpine" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.5-alpine" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-nginx-dev_8-5_publish: + name: 'webdevops/php-nginx-dev:8.5 - Publish' + runs-on: ubuntu-latest + needs: php-nginx-dev_8-5 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-nginx-dev/8.5-alpine - push: true - tags: 'ghcr.io/webdevops/php-nginx-dev:8.5-alpine,webdevops/php-nginx-dev:8.5-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx-dev:8.5" \ + -t "ghcr.io/webdevops/php-nginx-dev:8.5" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.5" \ + "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.5" && exit 0 + sleep $((i*i)) + done + exit 1 php-nginx_8-1: - name: 'webdevops/php-nginx:8.1' - needs: - - php_8-1 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx:8.1 (${{ matrix.arch }})' + needs: php_8-1_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.1 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx:8.1,webdevops/php-nginx:8.1' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.1' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx:8.1" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjEiLCJET0NLRVJfVEFHIjoiOC4xIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -2628,7 +4462,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-nginx:8.1 --config php-nginx/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.1 --config php-nginx/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -2638,55 +4472,111 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' + php-nginx_8-1-alpine: + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx:8.1-alpine (${{ matrix.arch }})' + needs: php_8-1-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' + container: webdevops/dockerfile-build-env + steps: + - + uses: actions/checkout@v6 + - + uses: docker/setup-buildx-action@v3 + - + name: 'Build (load locally)' + uses: docker/build-push-action@v6 with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' + context: docker/php-nginx/8.1-alpine + platforms: '${{ matrix.platform }}' + load: true + tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'run serverspec' + run: |- + cd tests/serverspec + echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test + echo "COPY conf/ /" >> Dockerfile_test + bundle install + bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjEtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMS1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test + - + name: 'run structure-test' + run: |- + cd tests/structure-test + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine --config php-nginx/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-nginx/8.1 - push: true - tags: 'ghcr.io/webdevops/php-nginx:8.1,webdevops/php-nginx:8.1' - platforms: linux/amd64 - php-nginx_8-1-alpine: - name: 'webdevops/php-nginx:8.1-alpine' - needs: - - php_8-1-alpine + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Push arch image' + if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' + php-nginx_8-1-alpine_publish: + name: 'webdevops/php-nginx:8.1-alpine - Publish' runs-on: ubuntu-latest - container: webdevops/dockerfile-build-env + needs: php-nginx_8-1-alpine + if: "${{github.ref == 'refs/heads/master'}}" steps: - - - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' - uses: docker/build-push-action@v6 + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 with: - context: docker/php-nginx/8.1-alpine - load: true - tags: 'ghcr.io/webdevops/php-nginx:8.1-alpine,webdevops/php-nginx:8.1-alpine' - platforms: linux/amd64 + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' - - name: 'run serverspec' + name: 'Create and push multi-arch manifest' run: |- - cd tests/serverspec - echo "FROM webdevops/php-nginx:8.1-alpine" >> Dockerfile_test - echo "COPY conf/ /" >> Dockerfile_test - bundle install - bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjEtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMS1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx:8.1-alpine" \ + -t "ghcr.io/webdevops/php-nginx:8.1-alpine" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.1-alpine" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-nginx_8-1_publish: + name: 'webdevops/php-nginx:8.1 - Publish' + runs-on: ubuntu-latest + needs: php-nginx_8-1 + if: "${{github.ref == 'refs/heads/master'}}" + steps: - - name: 'run structure-test' - run: |- - cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-nginx:8.1-alpine --config php-nginx/test.yaml + uses: docker/setup-buildx-action@v3 - - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' uses: docker/login-action@v3 with: @@ -2694,45 +4584,63 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-nginx/8.1-alpine - push: true - tags: 'ghcr.io/webdevops/php-nginx:8.1-alpine,webdevops/php-nginx:8.1-alpine' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx:8.1" \ + -t "ghcr.io/webdevops/php-nginx:8.1" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.1" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.1" && exit 0 + sleep $((i*i)) + done + exit 1 php-nginx_8-2: - name: 'webdevops/php-nginx:8.2' - needs: - - php_8-2 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx:8.2 (${{ matrix.arch }})' + needs: php_8-2_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.2 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx:8.2,webdevops/php-nginx:8.2' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx:8.2" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjIiLCJET0NLRVJfVEFHIjoiOC4yIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -2740,7 +4648,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-nginx:8.2 --config php-nginx/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2 --config php-nginx/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -2750,45 +4658,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-nginx/8.2 - push: true - tags: 'ghcr.io/webdevops/php-nginx:8.2,webdevops/php-nginx:8.2' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' php-nginx_8-2-alpine: - name: 'webdevops/php-nginx:8.2-alpine' - needs: - - php_8-2-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx:8.2-alpine (${{ matrix.arch }})' + needs: php_8-2-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.2-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx:8.2-alpine,webdevops/php-nginx:8.2-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx:8.2-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjItYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMi1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -2796,7 +4707,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-nginx:8.2-alpine --config php-nginx/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine --config php-nginx/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -2806,45 +4717,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' + php-nginx_8-2-alpine_publish: + name: 'webdevops/php-nginx:8.2-alpine - Publish' + runs-on: ubuntu-latest + needs: php-nginx_8-2-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx:8.2-alpine" \ + -t "ghcr.io/webdevops/php-nginx:8.2-alpine" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.2-alpine" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-nginx_8-2_publish: + name: 'webdevops/php-nginx:8.2 - Publish' + runs-on: ubuntu-latest + needs: php-nginx_8-2 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-nginx/8.2-alpine - push: true - tags: 'ghcr.io/webdevops/php-nginx:8.2-alpine,webdevops/php-nginx:8.2-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx:8.2" \ + -t "ghcr.io/webdevops/php-nginx:8.2" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.2" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.2" && exit 0 + sleep $((i*i)) + done + exit 1 php-nginx_8-3: - name: 'webdevops/php-nginx:8.3' - needs: - - php_8-3 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx:8.3 (${{ matrix.arch }})' + needs: php_8-3_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.3 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx:8.3,webdevops/php-nginx:8.3' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx:8.3" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjMiLCJET0NLRVJfVEFHIjoiOC4zIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -2852,7 +4834,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-nginx:8.3 --config php-nginx/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3 --config php-nginx/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -2862,45 +4844,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-nginx/8.3 - push: true - tags: 'ghcr.io/webdevops/php-nginx:8.3,webdevops/php-nginx:8.3' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' php-nginx_8-3-alpine: - name: 'webdevops/php-nginx:8.3-alpine' - needs: - - php_8-3-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx:8.3-alpine (${{ matrix.arch }})' + needs: php_8-3-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.3-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx:8.3-alpine,webdevops/php-nginx:8.3-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx:8.3-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjMtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMy1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -2908,7 +4893,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-nginx:8.3-alpine --config php-nginx/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine --config php-nginx/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -2918,45 +4903,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' + php-nginx_8-3-alpine_publish: + name: 'webdevops/php-nginx:8.3-alpine - Publish' + runs-on: ubuntu-latest + needs: php-nginx_8-3-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx:8.3-alpine" \ + -t "ghcr.io/webdevops/php-nginx:8.3-alpine" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.3-alpine" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-nginx_8-3_publish: + name: 'webdevops/php-nginx:8.3 - Publish' + runs-on: ubuntu-latest + needs: php-nginx_8-3 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-nginx/8.3-alpine - push: true - tags: 'ghcr.io/webdevops/php-nginx:8.3-alpine,webdevops/php-nginx:8.3-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx:8.3" \ + -t "ghcr.io/webdevops/php-nginx:8.3" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.3" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.3" && exit 0 + sleep $((i*i)) + done + exit 1 php-nginx_8-4: - name: 'webdevops/php-nginx:8.4' - needs: - - php_8-4 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx:8.4 (${{ matrix.arch }})' + needs: php_8-4_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.4 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx:8.4,webdevops/php-nginx:8.4' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx:8.4" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjQiLCJET0NLRVJfVEFHIjoiOC40IiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -2964,7 +5020,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-nginx:8.4 --config php-nginx/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4 --config php-nginx/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -2974,45 +5030,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-nginx/8.4 - push: true - tags: 'ghcr.io/webdevops/php-nginx:8.4,webdevops/php-nginx:8.4' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' php-nginx_8-4-alpine: - name: 'webdevops/php-nginx:8.4-alpine' - needs: - - php_8-4-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx:8.4-alpine (${{ matrix.arch }})' + needs: php_8-4-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.4-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx:8.4-alpine,webdevops/php-nginx:8.4-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx:8.4-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjQtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguNC1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -3020,7 +5079,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-nginx:8.4-alpine --config php-nginx/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine --config php-nginx/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3030,45 +5089,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' + php-nginx_8-4-alpine_publish: + name: 'webdevops/php-nginx:8.4-alpine - Publish' + runs-on: ubuntu-latest + needs: php-nginx_8-4-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx:8.4-alpine" \ + -t "ghcr.io/webdevops/php-nginx:8.4-alpine" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.4-alpine" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-nginx_8-4_publish: + name: 'webdevops/php-nginx:8.4 - Publish' + runs-on: ubuntu-latest + needs: php-nginx_8-4 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-nginx/8.4-alpine - push: true - tags: 'ghcr.io/webdevops/php-nginx:8.4-alpine,webdevops/php-nginx:8.4-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx:8.4" \ + -t "ghcr.io/webdevops/php-nginx:8.4" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.4" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.4" && exit 0 + sleep $((i*i)) + done + exit 1 php-nginx_8-5: - name: 'webdevops/php-nginx:8.5' - needs: - - php_8-5 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx:8.5 (${{ matrix.arch }})' + needs: php_8-5_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.5 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx:8.5,webdevops/php-nginx:8.5' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx:8.5" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjUiLCJET0NLRVJfVEFHIjoiOC41IiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -3076,7 +5206,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-nginx:8.5 --config php-nginx/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5 --config php-nginx/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3086,45 +5216,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-nginx/8.5 - push: true - tags: 'ghcr.io/webdevops/php-nginx:8.5,webdevops/php-nginx:8.5' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' php-nginx_8-5-alpine: - name: 'webdevops/php-nginx:8.5-alpine' - needs: - - php_8-5-alpine - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php-nginx:8.5-alpine (${{ matrix.arch }})' + needs: php_8-5-alpine_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.5-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php-nginx:8.5-alpine,webdevops/php-nginx:8.5-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php-nginx:8.5-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjUtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguNS1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -3132,7 +5265,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php-nginx:8.5-alpine --config php-nginx/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine --config php-nginx/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3142,45 +5275,116 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' + php-nginx_8-5-alpine_publish: + name: 'webdevops/php-nginx:8.5-alpine - Publish' + runs-on: ubuntu-latest + needs: php-nginx_8-5-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx:8.5-alpine" \ + -t "ghcr.io/webdevops/php-nginx:8.5-alpine" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.5-alpine" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php-nginx_8-5_publish: + name: 'webdevops/php-nginx:8.5 - Publish' + runs-on: ubuntu-latest + needs: php-nginx_8-5 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-nginx/8.5-alpine - push: true - tags: 'ghcr.io/webdevops/php-nginx:8.5-alpine,webdevops/php-nginx:8.5-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php-nginx:8.5" \ + -t "ghcr.io/webdevops/php-nginx:8.5" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.5" \ + "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.5" && exit 0 + sleep $((i*i)) + done + exit 1 php_8-1: - name: 'webdevops/php:8.1' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php:8.1 (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-official/8.1 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php:8.1,webdevops/php:8.1' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.1' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php:8.1" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjEiLCJET0NLRVJfVEFHIjoiOC4xIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -3188,7 +5392,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php:8.1 --config php/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.1 --config php/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3198,55 +5402,113 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-official/8.1 - push: true - tags: 'ghcr.io/webdevops/php:8.1,webdevops/php:8.1' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' php_8-1-alpine: - name: 'webdevops/php:8.1-alpine' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php:8.1-alpine (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-official/8.1-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php:8.1-alpine,webdevops/php:8.1-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'run serverspec' + run: |- + cd tests/serverspec + echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test + echo "COPY conf/ /" >> Dockerfile_test + bundle install + bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjEtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMS1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test + - + name: 'run structure-test' + run: |- + cd tests/structure-test + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine --config php/test.yaml + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Push arch image' + if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' + php_8-1-alpine_publish: + name: 'webdevops/php:8.1-alpine - Publish' + runs-on: ubuntu-latest + needs: php_8-1-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' - - name: 'run serverspec' + name: 'Create and push multi-arch manifest' run: |- - cd tests/serverspec - echo "FROM webdevops/php:8.1-alpine" >> Dockerfile_test - echo "COPY conf/ /" >> Dockerfile_test - bundle install - bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjEtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMS1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php:8.1-alpine" \ + -t "ghcr.io/webdevops/php:8.1-alpine" \ + -t "webdevops/php-official:8.1-alpine" \ + -t "ghcr.io/webdevops/php-official:8.1-alpine" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.1-alpine" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php_8-1_publish: + name: 'webdevops/php:8.1 - Publish' + runs-on: ubuntu-latest + needs: php_8-1 + if: "${{github.ref == 'refs/heads/master'}}" + steps: - - name: 'run structure-test' - run: |- - cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php:8.1-alpine --config php/test.yaml + uses: docker/setup-buildx-action@v3 - - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' uses: docker/login-action@v3 with: @@ -3254,45 +5516,65 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-official/8.1-alpine - push: true - tags: 'ghcr.io/webdevops/php:8.1-alpine,webdevops/php:8.1-alpine' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php:8.1" \ + -t "ghcr.io/webdevops/php:8.1" \ + -t "webdevops/php-official:8.1" \ + -t "ghcr.io/webdevops/php-official:8.1" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.1" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.1" && exit 0 + sleep $((i*i)) + done + exit 1 php_8-2: - name: 'webdevops/php:8.2' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php:8.2 (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-official/8.2 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php:8.2,webdevops/php:8.2' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php:8.2" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjIiLCJET0NLRVJfVEFHIjoiOC4yIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -3300,7 +5582,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php:8.2 --config php/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2 --config php/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3310,45 +5592,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-official/8.2 - push: true - tags: 'ghcr.io/webdevops/php:8.2,webdevops/php:8.2' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' php_8-2-alpine: - name: 'webdevops/php:8.2-alpine' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php:8.2-alpine (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-official/8.2-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php:8.2-alpine,webdevops/php:8.2-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php:8.2-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjItYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMi1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -3356,7 +5641,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php:8.2-alpine --config php/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine --config php/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3366,45 +5651,120 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' + php_8-2-alpine_publish: + name: 'webdevops/php:8.2-alpine - Publish' + runs-on: ubuntu-latest + needs: php_8-2-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php:8.2-alpine" \ + -t "ghcr.io/webdevops/php:8.2-alpine" \ + -t "webdevops/php-official:8.2-alpine" \ + -t "ghcr.io/webdevops/php-official:8.2-alpine" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.2-alpine" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php_8-2_publish: + name: 'webdevops/php:8.2 - Publish' + runs-on: ubuntu-latest + needs: php_8-2 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-official/8.2-alpine - push: true - tags: 'ghcr.io/webdevops/php:8.2-alpine,webdevops/php:8.2-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php:8.2" \ + -t "ghcr.io/webdevops/php:8.2" \ + -t "webdevops/php-official:8.2" \ + -t "ghcr.io/webdevops/php-official:8.2" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.2" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.2" && exit 0 + sleep $((i*i)) + done + exit 1 php_8-3: - name: 'webdevops/php:8.3' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php:8.3 (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-official/8.3 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php:8.3,webdevops/php:8.3' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php:8.3" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjMiLCJET0NLRVJfVEFHIjoiOC4zIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -3412,7 +5772,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php:8.3 --config php/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3 --config php/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3422,45 +5782,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-official/8.3 - push: true - tags: 'ghcr.io/webdevops/php:8.3,webdevops/php:8.3' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' php_8-3-alpine: - name: 'webdevops/php:8.3-alpine' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php:8.3-alpine (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-official/8.3-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php:8.3-alpine,webdevops/php:8.3-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php:8.3-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjMtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMy1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -3468,7 +5831,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php:8.3-alpine --config php/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine --config php/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3478,45 +5841,120 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' + php_8-3-alpine_publish: + name: 'webdevops/php:8.3-alpine - Publish' + runs-on: ubuntu-latest + needs: php_8-3-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php:8.3-alpine" \ + -t "ghcr.io/webdevops/php:8.3-alpine" \ + -t "webdevops/php-official:8.3-alpine" \ + -t "ghcr.io/webdevops/php-official:8.3-alpine" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.3-alpine" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php_8-3_publish: + name: 'webdevops/php:8.3 - Publish' + runs-on: ubuntu-latest + needs: php_8-3 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-official/8.3-alpine - push: true - tags: 'ghcr.io/webdevops/php:8.3-alpine,webdevops/php:8.3-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php:8.3" \ + -t "ghcr.io/webdevops/php:8.3" \ + -t "webdevops/php-official:8.3" \ + -t "ghcr.io/webdevops/php-official:8.3" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.3" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.3" && exit 0 + sleep $((i*i)) + done + exit 1 php_8-4: - name: 'webdevops/php:8.4' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php:8.4 (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-official/8.4 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php:8.4,webdevops/php:8.4' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php:8.4" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjQiLCJET0NLRVJfVEFHIjoiOC40IiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -3524,7 +5962,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php:8.4 --config php/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4 --config php/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3534,45 +5972,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-official/8.4 - push: true - tags: 'ghcr.io/webdevops/php:8.4,webdevops/php:8.4' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' php_8-4-alpine: - name: 'webdevops/php:8.4-alpine' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php:8.4-alpine (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-official/8.4-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php:8.4-alpine,webdevops/php:8.4-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php:8.4-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjQtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguNC1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -3580,7 +6021,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php:8.4-alpine --config php/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine --config php/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3590,45 +6031,120 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' + php_8-4-alpine_publish: + name: 'webdevops/php:8.4-alpine - Publish' + runs-on: ubuntu-latest + needs: php_8-4-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php:8.4-alpine" \ + -t "ghcr.io/webdevops/php:8.4-alpine" \ + -t "webdevops/php-official:8.4-alpine" \ + -t "ghcr.io/webdevops/php-official:8.4-alpine" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.4-alpine" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php_8-4_publish: + name: 'webdevops/php:8.4 - Publish' + runs-on: ubuntu-latest + needs: php_8-4 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-official/8.4-alpine - push: true - tags: 'ghcr.io/webdevops/php:8.4-alpine,webdevops/php:8.4-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php:8.4" \ + -t "ghcr.io/webdevops/php:8.4" \ + -t "webdevops/php-official:8.4" \ + -t "ghcr.io/webdevops/php-official:8.4" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.4" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.4" && exit 0 + sleep $((i*i)) + done + exit 1 php_8-5: - name: 'webdevops/php:8.5' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php:8.5 (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-official/8.5 + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php:8.5,webdevops/php:8.5' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php:8.5" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjUiLCJET0NLRVJfVEFHIjoiOC41IiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test @@ -3636,7 +6152,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php:8.5 --config php/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5 --config php/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3646,45 +6162,48 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to hub.docker.com' - uses: docker/login-action@v3 - with: - username: '${{ secrets.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_TOKEN }}' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/php-official/8.5 - push: true - tags: 'ghcr.io/webdevops/php:8.5,webdevops/php:8.5' - platforms: linux/amd64 + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' php_8-5-alpine: - name: 'webdevops/php:8.5-alpine' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/php:8.5-alpine (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/php-official/8.5-alpine + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/php:8.5-alpine,webdevops/php:8.5-alpine' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/php:8.5-alpine" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjUtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguNS1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -3692,7 +6211,7 @@ jobs: name: 'run structure-test' run: |- cd tests/structure-test - /usr/local/bin/container-structure-test test --image webdevops/php:8.5-alpine --config php/test.yaml + /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine --config php/test.yaml - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3702,40 +6221,115 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' + php_8-5-alpine_publish: + name: 'webdevops/php:8.5-alpine - Publish' + runs-on: ubuntu-latest + needs: php_8-5-alpine + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php:8.5-alpine" \ + -t "ghcr.io/webdevops/php:8.5-alpine" \ + -t "webdevops/php-official:8.5-alpine" \ + -t "ghcr.io/webdevops/php-official:8.5-alpine" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.5-alpine" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 + sleep $((i*i)) + done + exit 1 + php_8-5_publish: + name: 'webdevops/php:8.5 - Publish' + runs-on: ubuntu-latest + needs: php_8-5 + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 with: - context: docker/php-official/8.5-alpine - push: true - tags: 'ghcr.io/webdevops/php:8.5-alpine,webdevops/php:8.5-alpine' - platforms: linux/amd64 + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - + name: 'Login to hub.docker.com' + uses: docker/login-action@v3 + with: + username: '${{ secrets.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_TOKEN }}' + - + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/php:8.5" \ + -t "ghcr.io/webdevops/php:8.5" \ + -t "webdevops/php-official:8.5" \ + -t "ghcr.io/webdevops/php-official:8.5" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.5" \ + "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.5" && exit 0 + sleep $((i*i)) + done + exit 1 storage_latest: - name: 'webdevops/storage:latest' - needs: - - toolbox_latest - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/storage:latest (${{ matrix.arch }})' + needs: toolbox_latest_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/storage/latest + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/storage:latest,webdevops/storage:latest' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/storage:sha-${{ github.sha }}-${{ matrix.arch }}-latest' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3745,40 +6339,77 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/storage:sha-${{ github.sha }}-${{ matrix.arch }}"-latest' + storage_latest_publish: + name: 'webdevops/storage:latest - Publish' + runs-on: ubuntu-latest + needs: storage_latest + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/storage/latest - push: true - tags: 'ghcr.io/webdevops/storage:latest,webdevops/storage:latest' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/storage:latest" \ + -t "ghcr.io/webdevops/storage:latest" \ + "ghcr.io/webdevops/storage:sha-${{ github.sha }}-amd64-latest" \ + "ghcr.io/webdevops/storage:sha-${{ github.sha }}-arm64-latest" && exit 0 + sleep $((i*i)) + done + exit 1 toolbox_latest: - name: 'webdevops/toolbox:latest' - needs: - - validate-automation - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/toolbox:latest (${{ matrix.arch }})' + needs: validate-automation + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/toolbox/latest + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/toolbox:latest,webdevops/toolbox:latest' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -3788,45 +6419,82 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}"-latest' + toolbox_latest_publish: + name: 'webdevops/toolbox:latest - Publish' + runs-on: ubuntu-latest + needs: toolbox_latest + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/toolbox/latest - push: true - tags: 'ghcr.io/webdevops/toolbox:latest,webdevops/toolbox:latest' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/toolbox:latest" \ + -t "ghcr.io/webdevops/toolbox:latest" \ + "ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-amd64-latest" \ + "ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-arm64-latest" && exit 0 + sleep $((i*i)) + done + exit 1 vsftp_latest: - name: 'webdevops/vsftp:latest' - needs: - - base_ubuntu-22-04 - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - + arch: amd64 + runner: ubuntu-24.04 + platform: linux/amd64 + - + arch: arm64 + runner: ubuntu-24.04-arm + platform: linux/arm64 + name: 'webdevops/vsftp:latest (${{ matrix.arch }})' + needs: base_ubuntu-22-04_publish + if: '${{ !failure() }}' + runs-on: '${{ matrix.runner }}' container: webdevops/dockerfile-build-env steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 - - name: 'Build x64' + name: 'Build (load locally)' uses: docker/build-push-action@v6 with: context: docker/vsftp/latest + platforms: '${{ matrix.platform }}' load: true - tags: 'ghcr.io/webdevops/vsftp:latest,webdevops/vsftp:latest' - platforms: linux/amd64 + tags: 'ghcr.io/webdevops/vsftp:sha-${{ github.sha }}-${{ matrix.arch }}-latest' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' - name: 'run serverspec' run: |- cd tests/serverspec - echo "FROM webdevops/vsftp:latest" >> Dockerfile_test + echo "FROM ghcr.io/webdevops/vsftp:sha-${{ github.sha }}-${{ matrix.arch }}"-latest >> Dockerfile_test echo "COPY conf/ /" >> Dockerfile_test bundle install bash serverspec.sh spec/docker/vsftp_spec.rb webdevops/vsftp:latest eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3ZzZnRwOmxhdGVzdCIsIkRPQ0tFUl9UQUciOiJsYXRlc3QiLCJPU19GQU1JTFkiOiJ1YnVudHUiLCJPU19WRVJTSU9OIjoiMjIuMDQiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test @@ -3839,18 +6507,40 @@ jobs: username: '${{ github.actor }}' password: '${{ secrets.GITHUB_TOKEN }}' - + name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" + run: 'docker push "ghcr.io/webdevops/vsftp:sha-${{ github.sha }}-${{ matrix.arch }}"-latest' + vsftp_latest_publish: + name: 'webdevops/vsftp:latest - Publish' + runs-on: ubuntu-latest + needs: vsftp_latest + if: "${{github.ref == 'refs/heads/master'}}" + steps: + - + uses: docker/setup-buildx-action@v3 + - + name: 'Login to ghcr.io' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' + - name: 'Login to hub.docker.com' uses: docker/login-action@v3 with: username: '${{ secrets.DOCKERHUB_USERNAME }}' password: '${{ secrets.DOCKERHUB_TOKEN }}' - - if: "${{github.ref == 'refs/heads/master'}}" - name: Push - uses: docker/build-push-action@v6 - with: - context: docker/vsftp/latest - push: true - tags: 'ghcr.io/webdevops/vsftp:latest,webdevops/vsftp:latest' - platforms: linux/amd64 + name: 'Create and push multi-arch manifest' + run: |- + set -euo pipefail + for i in 1 2 3 4 5 6 7 8 9 10; do + docker buildx imagetools create \ + -t "webdevops/vsftp:latest" \ + -t "ghcr.io/webdevops/vsftp:latest" \ + "ghcr.io/webdevops/vsftp:sha-${{ github.sha }}-amd64-latest" \ + "ghcr.io/webdevops/vsftp:sha-${{ github.sha }}-arm64-latest" && exit 0 + sleep $((i*i)) + done + exit 1 \ No newline at end of file diff --git a/build-local.sh b/build-local.sh index f61a80bf3..604365667 100755 --- a/build-local.sh +++ b/build-local.sh @@ -11,42 +11,30 @@ PHP_VERSION=8.5 if [ "$#" -gt 0 ]; then PHP_VERSION=$1 - if [ ! -d "$ROOT_DIR/docker/php/$PHP_VERSION" ]; then + if [ ! -d "docker/php/$PHP_VERSION" ]; then echo "PHP version $PHP_VERSION not found" exit 1 fi fi # alpine -cd $ROOT_DIR/docker/php/$PHP_VERSION-alpine -docker build -t webdevops/php:$PHP_VERSION-alpine . -cd $ROOT_DIR/docker/php-dev/$PHP_VERSION-alpine -docker build -t webdevops/php-dev:$PHP_VERSION-alpine . +docker build -t webdevops/php:$PHP_VERSION-alpine docker/php/$PHP_VERSION-alpine +docker build -t webdevops/php-dev:$PHP_VERSION-alpine docker/php-dev/$PHP_VERSION-alpine -cd $ROOT_DIR/docker/php-nginx/$PHP_VERSION-alpine -docker build -t webdevops/php-nginx:$PHP_VERSION-alpine . -cd $ROOT_DIR/docker/php-nginx-dev/$PHP_VERSION-alpine -docker build -t webdevops/php-nginx-dev:$PHP_VERSION-alpine . +docker build -t webdevops/php-nginx:$PHP_VERSION-alpine docker/php-nginx/$PHP_VERSION-alpine +docker build -t webdevops/php-nginx-dev:$PHP_VERSION-alpine docker/php-nginx-dev/$PHP_VERSION-alpine -cd $ROOT_DIR/docker/php-apache/$PHP_VERSION-alpine -docker build -t webdevops/php-apache:$PHP_VERSION-alpine . -cd $ROOT_DIR/docker/php-apache-dev/$PHP_VERSION-alpine -docker build -t webdevops/php-apache-dev:$PHP_VERSION-alpine . +docker build -t webdevops/php-apache:$PHP_VERSION-alpine docker/php-apache/$PHP_VERSION-alpine +docker build -t webdevops/php-apache-dev:$PHP_VERSION-alpine docker/php-apache-dev/$PHP_VERSION-alpine # debian -cd $ROOT_DIR/docker/php/$PHP_VERSION -docker build -t webdevops/php:$PHP_VERSION . -cd $ROOT_DIR/docker/php-dev/$PHP_VERSION -docker build -t webdevops/php-dev:$PHP_VERSION . - -cd $ROOT_DIR/docker/php-nginx/$PHP_VERSION -docker build -t webdevops/php-nginx:$PHP_VERSION . -cd $ROOT_DIR/docker/php-nginx-dev/$PHP_VERSION -docker build -t webdevops/php-nginx-dev:$PHP_VERSION . - -cd $ROOT_DIR/docker/php-apache/$PHP_VERSION -docker build -t webdevops/php-apache:$PHP_VERSION . -cd $ROOT_DIR/docker/php-apache-dev/$PHP_VERSION -docker build -t webdevops/php-apache-dev:$PHP_VERSION . +docker build -t webdevops/php:$PHP_VERSION docker/php/$PHP_VERSION +docker build -t webdevops/php-dev:$PHP_VERSION docker/php-dev/$PHP_VERSION + +docker build -t webdevops/php-nginx:$PHP_VERSION docker/php-nginx/$PHP_VERSION +docker build -t webdevops/php-nginx-dev:$PHP_VERSION docker/php-nginx-dev/$PHP_VERSION + +docker build -t webdevops/php-apache:$PHP_VERSION docker/php-apache/$PHP_VERSION +docker build -t webdevops/php-apache-dev:$PHP_VERSION docker/php-apache-dev/$PHP_VERSION docker images | grep webdevops | grep $PHP_VERSION diff --git a/ci/src/Commands/GithubCommand.php b/ci/src/Commands/GithubCommand.php index 7b079a22b..8d0af2e21 100644 --- a/ci/src/Commands/GithubCommand.php +++ b/ci/src/Commands/GithubCommand.php @@ -85,12 +85,16 @@ private function traverse(Node $node): void if ($node->getLevel() > $this->deepestLevel) { $this->deepestLevel = $node->getLevel(); } - $this->jobs[GithubJobBuilder::toJobId($node->getId())] = $this->jobBuilder->getJobDescription($nodeAr); + $this->jobs = [ + ...$this->jobs, + ...$this->jobBuilder->getJobsDescription($nodeAr), + ]; if ($this->isNameBlacklisted($nodeAr['id'])) { // $this->jobs[GithubJobBuilder::toJobId($node->getId())] = array_merge($this->jobs[GithubJobBuilder::toJobId($node->getId())], ['when' => 'manual']); $line .= ' *blacklisted*'; if ($node->get('tag') !== $this->_settings['docker']['autoLatestTag']) { unset($this->jobs[GithubJobBuilder::toJobId($node->getId())]); + unset($this->jobs[GithubJobBuilder::toJobId($node->getId()) . '_publish']); } } $this->output->write([str_pad('', $node->getLevel() - 1, "\t", STR_PAD_LEFT), $line, PHP_EOL]); diff --git a/ci/src/GithubJobBuilder.php b/ci/src/GithubJobBuilder.php index 65a404750..1675249ab 100644 --- a/ci/src/GithubJobBuilder.php +++ b/ci/src/GithubJobBuilder.php @@ -2,83 +2,148 @@ namespace Webdevops\Build; +use function array_filter; +use function array_values; +use function dirname; +use function implode; use function str_replace; class GithubJobBuilder { - - public function getJobDescription(array $node): array + /** + * @return array> + */ + public function getJobsDescription(array $node): array { $serverSpec = $this->serverSpec($node); $structuredTests = $this->structuredTests($node); + $jobId = GithubJobBuilder::toJobId($node['name']); + $needs = ($node['parent'] ?? null) ? GithubJobBuilder::toJobId($node['parent']) . '_publish' : 'validate-automation'; + + $pushTags = []; + $pushTags[] = '-t "' . $node['id'] . '"'; + $pushTags[] = '-t "ghcr.io/' . $node['id'] . '"'; + foreach ($node['aliases'] as $alias) { + $pushTags[] = '-t "' . $alias . '"'; + $pushTags[] = '-t "ghcr.io/' . $alias . '"'; + } return [ - 'name' => $node['name'], - 'needs' => [ - ($node['parent'] ?? null) ? GithubJobBuilder::toJobId($node['parent']) : 'validate-automation', - ], - 'runs-on' => 'ubuntu-latest', - 'container' => 'webdevops/dockerfile-build-env', - 'steps' => array_values( - array_filter( - [ - ['uses' => 'actions/checkout@v4'], -// ['uses' => 'docker/setup-qemu-action@v3'], // only needed for ARM builds - ['uses' => 'docker/setup-buildx-action@v3'], - [ - 'name' => 'Build x64', - 'uses' => 'docker/build-push-action@v6', - 'with' => [ - 'context' => dirname(str_replace(__DIR__ . '/../../', '', $node['file'])), - 'load' => true, - 'tags' => 'ghcr.io/webdevops/' . $node['image'] . ':' . $node['tag'] . ',webdevops/' . $node['image'] . ':' . $node['tag'], - 'platforms' => 'linux/amd64', + $jobId => [ + 'strategy' => [ + 'fail-fast' => false, + 'matrix' => [ + 'include' => [ + [ + 'arch' => 'amd64', + 'runner' => 'ubuntu-24.04', + 'platform' => 'linux/amd64', ], - ], - $serverSpec ? [ - 'name' => 'run serverspec', - 'run' => implode("\n", $serverSpec), - ] : null, - $structuredTests ? [ - 'name' => 'run structure-test', - 'run' => implode("\n", $structuredTests), - ] : null, - [ - 'if' => '${{github.ref == \'refs/heads/master\'}}', - 'name' => 'Login to ghcr.io', - 'uses' => 'docker/login-action@v3', - 'with' => [ - 'registry' => 'ghcr.io', - 'username' => '${{ github.actor }}', - 'password' => '${{ secrets.GITHUB_TOKEN }}', + [ + 'arch' => 'arm64', + 'runner' => 'ubuntu-24.04-arm', + 'platform' => 'linux/arm64', ], ], + ], + ], + 'name' => $node['name'] . ' (${{ matrix.arch }})', + 'needs' => $needs, + // even run if previous job skipped + 'if' => '${{ !failure() }}', + 'runs-on' => '${{ matrix.runner }}', + 'container' => 'webdevops/dockerfile-build-env', + 'steps' => array_values( + array_filter( [ - // login after the build so the rate limit of github is used and not from our login Token. - 'if' => '${{github.ref == \'refs/heads/master\'}}', - 'name' => 'Login to hub.docker.com', - 'uses' => 'docker/login-action@v3', - 'with' => [ - 'username' => '${{ secrets.DOCKERHUB_USERNAME }}', - 'password' => '${{ secrets.DOCKERHUB_TOKEN }}', + ['uses' => 'actions/checkout@v6'], + ['uses' => 'docker/setup-buildx-action@v3'], + [ + 'name' => 'Build (load locally)', + 'uses' => 'docker/build-push-action@v6', + 'with' => [ + 'context' => dirname(str_replace(__DIR__ . '/../../', '', $node['file'])), + 'platforms' => '${{ matrix.platform }}', + 'load' => true, + 'tags' => 'ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $node['tag'], + 'cache-from' => 'type=gha', + 'cache-to' => 'type=gha,mode=max', + 'build-args' => implode("\n", [ + 'TARGETARCH=${{ matrix.arch }}', + ]), + ], ], - ], - [ - 'if' => '${{github.ref == \'refs/heads/master\'}}', - 'name' => 'Push', -// 'name' => 'Build ARM + Push', - 'uses' => 'docker/build-push-action@v6', - 'with' => [ - 'context' => dirname(str_replace(__DIR__ . '/../../', '', $node['file'])), - 'push' => true, - 'tags' => 'ghcr.io/webdevops/' . $node['image'] . ':' . $node['tag'] . ',webdevops/' . $node['image'] . ':' . $node['tag'], - 'platforms' => 'linux/amd64', -// 'platforms' => 'linux/amd64,linux/arm64', // ARM not ready yet + $serverSpec ? [ + 'name' => 'run serverspec', + 'run' => implode("\n", $serverSpec), + ] : null, + $structuredTests ? [ + 'name' => 'run structure-test', + 'run' => implode("\n", $structuredTests), + ] : null, + [ + 'if' => '${{github.ref == \'refs/heads/master\'}}', + 'name' => 'Login to ghcr.io', + 'uses' => 'docker/login-action@v3', + 'with' => [ + 'registry' => 'ghcr.io', + 'username' => '${{ github.actor }}', + 'password' => '${{ secrets.GITHUB_TOKEN }}', + ], + ], + [ + 'name' => 'Push arch image', + 'if' => '${{github.ref == \'refs/heads/master\'}}', + 'run' => 'docker push "ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}"-' . $node['tag'], ], ], - ], + ), ), - ), + ], + $jobId . '_publish' => [ + 'name' => $node['name'] . ' - Publish', + 'runs-on' => 'ubuntu-latest', + 'needs' => $jobId, + 'if' => '${{github.ref == \'refs/heads/master\'}}', + 'steps' => [ + ['uses' => 'docker/setup-buildx-action@v3'], + [ + 'name' => 'Login to ghcr.io', + 'uses' => 'docker/login-action@v3', + 'with' => [ + 'registry' => 'ghcr.io', + 'username' => '${{ github.actor }}', + 'password' => '${{ secrets.GITHUB_TOKEN }}', + ], + ], + [ + 'name' => 'Login to hub.docker.com', + 'uses' => 'docker/login-action@v3', + 'with' => [ + 'username' => '${{ secrets.DOCKERHUB_USERNAME }}', + 'password' => '${{ secrets.DOCKERHUB_TOKEN }}', + ], + ], + [ + 'name' => 'Create and push multi-arch manifest', + 'run' => + // we need the retry loop here because sometimes docker hub returns errors when pushing manifests (especially if pushed to the same image multiple times in a short time frame) + implode("\n", [ + 'set -euo pipefail', + 'for i in 1 2 3 4 5 6 7 8 9 10; do', + ' ' . implode(" \\\n ", [ + 'docker buildx imagetools create', + ...$pushTags, + '"ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-amd64-' . $node['tag'] . '"', + '"ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-arm64-' . $node['tag'] . '" && exit 0', + ]), + ' sleep $((i*i))', + 'done', + 'exit 1', + ]), + ], + ], + ], ]; } @@ -98,14 +163,13 @@ private function serverSpec(array $node): array return []; } -// $testDockerfile = uniqid('Dockerfile_', true); $testDockerfile = 'Dockerfile_test'; $specConfig = $node['serverspec']; $specConfig['DOCKERFILE'] = $testDockerfile; $encodedJsonConfig = base64_encode(json_encode($specConfig)); $script = [ 'cd tests/serverspec', - 'echo "FROM ' . $node['id'] . '" >> ' . $testDockerfile, + 'echo "FROM ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}"-' . $node['tag'] . ' >> ' . $testDockerfile, 'echo "COPY conf/ /" >> ' . $testDockerfile, ]; $script[] = 'bundle install'; @@ -119,9 +183,9 @@ private function structuredTests(array $node): array if (file_exists(__DIR__ . '/../../tests/structure-test/' . $node['image'] . '/test.yaml')) { $script[] = 'cd tests/structure-test'; if (file_exists(__DIR__ . '/../../tests/structure-test/' . $node['image'] . '/' . $node['tag'] . '/test.yaml')) { - $script[] = '/usr/local/bin/container-structure-test test --image ' . $node['name'] . ' --config ' . $node['image'] . '/test.yaml --config ' . $node['image'] . '/' . $node['tag'] . '/test.yaml'; + $script[] = '/usr/local/bin/container-structure-test test --image ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $node['tag'] . ' --config ' . $node['image'] . '/test.yaml --config ' . $node['image'] . '/' . $node['tag'] . '/test.yaml'; } else { - $script[] = '/usr/local/bin/container-structure-test test --image ' . $node['name'] . ' --config ' . $node['image'] . '/test.yaml'; + $script[] = '/usr/local/bin/container-structure-test test --image ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $node['tag'] . ' --config ' . $node['image'] . '/test.yaml'; } } return $script; @@ -133,7 +197,7 @@ public function getValidationConfig(): array 'name' => 'Validate Automation', 'runs-on' => 'ubuntu-latest', 'steps' => [ - ['uses' => 'actions/checkout@v4'], + ['uses' => 'actions/checkout@v6'], [ 'name' => 'Validate that template/* are used to generate Dockerfiles', 'run' => implode("\n", [ diff --git a/docker/dockerfile-build-env/latest/Dockerfile b/docker/dockerfile-build-env/latest/Dockerfile index 6e21b3a7f..610e71e73 100644 --- a/docker/dockerfile-build-env/latest/Dockerfile +++ b/docker/dockerfile-build-env/latest/Dockerfile @@ -4,6 +4,7 @@ #+++++++++++++++++++++++++++++++++++++++ FROM webdevops/base-app:ubuntu-22.04 +ARG TARGETARCH RUN apt-install \ build-essential \ @@ -19,18 +20,20 @@ RUN apt-install \ ruby \ ruby-dev \ ruby-bundler \ + libyaml-dev \ && curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py \ && python2 get-pip.py \ && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && add-apt-repository "deb [arch=$TARGETARCH] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ && apt-install docker-ce \ && usermod -aG docker application \ - && curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 \ - && chmod +x container-structure-test-linux-amd64 \ - && mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test \ + && curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-$TARGETARCH \ + && chmod +x container-structure-test-linux-$TARGETARCH \ + && mv container-structure-test-linux-$TARGETARCH /usr/local/bin/container-structure-test \ && pip install --upgrade pip \ && hash -r pip \ && pip install --upgrade setuptools \ + && pip install Cython==0.29.21 wheel \ && git clone --depth 1 https://github.com/webdevops/Dockerfile.git /tmp/Dockerfile \ && gem install bundler -v 2.1.4 --no-document \ && cd /tmp/Dockerfile/tests/serverspec \ diff --git a/docker/dockerfile-build-env/latest/Dockerfile.jinja2 b/docker/dockerfile-build-env/latest/Dockerfile.jinja2 index b6ebd683f..31120da94 100644 --- a/docker/dockerfile-build-env/latest/Dockerfile.jinja2 +++ b/docker/dockerfile-build-env/latest/Dockerfile.jinja2 @@ -1,4 +1,5 @@ {{ docker.from("base-app","ubuntu-22.04") }} +ARG TARGETARCH RUN apt-install \ build-essential \ @@ -14,18 +15,20 @@ RUN apt-install \ ruby \ ruby-dev \ ruby-bundler \ + libyaml-dev \ && curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py \ && python2 get-pip.py \ && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && add-apt-repository "deb [arch=$TARGETARCH] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ && apt-install docker-ce \ && usermod -aG docker application \ - && curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 \ - && chmod +x container-structure-test-linux-amd64 \ - && mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test \ + && curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-$TARGETARCH \ + && chmod +x container-structure-test-linux-$TARGETARCH \ + && mv container-structure-test-linux-$TARGETARCH /usr/local/bin/container-structure-test \ && pip install --upgrade pip \ && hash -r pip \ && pip install --upgrade setuptools \ + && pip install Cython==0.29.21 wheel \ && git clone --depth 1 https://github.com/webdevops/Dockerfile.git /tmp/Dockerfile \ && gem install bundler -v 2.1.4 --no-document \ && cd /tmp/Dockerfile/tests/serverspec \ diff --git a/docker/php-official/5.6/Dockerfile b/docker/php-official/5.6/Dockerfile index 1f0338312..6f67e0490 100644 --- a/docker/php-official/5.6/Dockerfile +++ b/docker/php-official/5.6/Dockerfile @@ -141,7 +141,7 @@ RUN set -x \ # Install extensions && docker-php-ext-configure intl --with-icu-dir=/usr/local \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ bcmath \ diff --git a/docker/php-official/7.0/Dockerfile b/docker/php-official/7.0/Dockerfile index c93cc525d..625accc8b 100644 --- a/docker/php-official/7.0/Dockerfile +++ b/docker/php-official/7.0/Dockerfile @@ -141,7 +141,7 @@ RUN set -x \ # Install extensions && docker-php-ext-configure intl --with-icu-dir=/usr/local \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ bcmath \ diff --git a/docker/php-official/7.1/Dockerfile b/docker/php-official/7.1/Dockerfile index 228fe7191..645dabd93 100644 --- a/docker/php-official/7.1/Dockerfile +++ b/docker/php-official/7.1/Dockerfile @@ -141,7 +141,7 @@ RUN set -x \ # Install extensions && docker-php-ext-configure intl --with-icu-dir=/usr/local \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ bcmath \ diff --git a/docker/php-official/7.2/Dockerfile b/docker/php-official/7.2/Dockerfile index 0b0fb6f14..1aff39596 100644 --- a/docker/php-official/7.2/Dockerfile +++ b/docker/php-official/7.2/Dockerfile @@ -141,7 +141,7 @@ RUN set -x \ # Install extensions && docker-php-ext-configure intl --with-icu-dir=/usr/local \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ bcmath \ diff --git a/docker/php-official/7.3/Dockerfile b/docker/php-official/7.3/Dockerfile index 081ab7660..d3ba03564 100644 --- a/docker/php-official/7.3/Dockerfile +++ b/docker/php-official/7.3/Dockerfile @@ -141,7 +141,7 @@ RUN set -x \ # Install extensions && docker-php-ext-configure intl --with-icu-dir=/usr/local \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ bcmath \ diff --git a/docker/php-official/7.4/Dockerfile b/docker/php-official/7.4/Dockerfile index 9db5049bc..17a6da264 100644 --- a/docker/php-official/7.4/Dockerfile +++ b/docker/php-official/7.4/Dockerfile @@ -141,7 +141,7 @@ RUN set -x \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ bcmath \ diff --git a/docker/php-official/8.0/Dockerfile b/docker/php-official/8.0/Dockerfile index fd2e752ee..1f98e1b35 100644 --- a/docker/php-official/8.0/Dockerfile +++ b/docker/php-official/8.0/Dockerfile @@ -143,7 +143,7 @@ RUN set -x \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ bcmath \ diff --git a/docker/php-official/8.1/Dockerfile b/docker/php-official/8.1/Dockerfile index d1c15bdd3..e11eaef89 100644 --- a/docker/php-official/8.1/Dockerfile +++ b/docker/php-official/8.1/Dockerfile @@ -143,7 +143,7 @@ RUN set -x \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ bcmath \ diff --git a/docker/php-official/8.2/Dockerfile b/docker/php-official/8.2/Dockerfile index 23b67b6cf..cde3347c3 100644 --- a/docker/php-official/8.2/Dockerfile +++ b/docker/php-official/8.2/Dockerfile @@ -143,7 +143,7 @@ RUN set -x \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ bcmath \ diff --git a/docker/php-official/8.3/Dockerfile b/docker/php-official/8.3/Dockerfile index 93c27f604..7377141ac 100644 --- a/docker/php-official/8.3/Dockerfile +++ b/docker/php-official/8.3/Dockerfile @@ -143,7 +143,7 @@ RUN set -x \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && docker-php-ext-install \ bcmath \ diff --git a/docker/php-official/8.4-alpine/Dockerfile b/docker/php-official/8.4-alpine/Dockerfile index a4f9f5c5b..9aa55af3d 100644 --- a/docker/php-official/8.4-alpine/Dockerfile +++ b/docker/php-official/8.4-alpine/Dockerfile @@ -22,7 +22,7 @@ ENV APPLICATION_USER=application \ APPLICATION_PATH=/app \ APPLICATION_UID=1000 \ APPLICATION_GID=1000 -ENV PHP_SENDMAIL_PATH="/usr/sbin/sendmail -t -i" +ENV PHP_SENDMAIL_PATH="/usr/sbin/sendmail -t -i" ENV LD_PRELOAD="/usr/lib/preloadable_libiconv.so" ENV COMPOSER_VERSION="2" diff --git a/docker/php-official/8.4/Dockerfile b/docker/php-official/8.4/Dockerfile index 92f2cfc17..eb2bc75e2 100644 --- a/docker/php-official/8.4/Dockerfile +++ b/docker/php-official/8.4/Dockerfile @@ -143,7 +143,7 @@ RUN set -x \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ - && docker-php-ext-configure ldap \ + && docker-php-ext-configure ldap \ && docker-php-ext-install \ bcmath \ amqp \ diff --git a/docker/php-official/8.5/Dockerfile b/docker/php-official/8.5/Dockerfile index 0dc667ae0..bfda78378 100644 --- a/docker/php-official/8.5/Dockerfile +++ b/docker/php-official/8.5/Dockerfile @@ -143,7 +143,7 @@ RUN set -x \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-configure ldap \ && docker-php-ext-install \ bcmath \ amqp \