diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7240a40b1..234e98e00 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,7 +3,9 @@ name: build schedule: - cron: '0 0 * * *' - push: null + push: + branches: + - master pull_request: branches: - master @@ -49,8 +51,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/base:alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-base_alpine-${{ matrix.arch }}' + path: .ci-oci-image/base_alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/apache/alpine + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/apache/alpine @@ -60,6 +82,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/base:alpine=oci-layout://.ci-oci-image/base_alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -137,8 +160,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/base:alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-base_alpine-${{ matrix.arch }}' + path: .ci-oci-image/base_alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/base-app/alpine @@ -148,6 +179,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/base-app/alpine + platforms: '${{ matrix.platform }}' + load: true + 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 }}' + build-contexts: 'webdevops/base:alpine=oci-layout://.ci-oci-image/base_alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -230,8 +274,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/base:ubuntu-22.04' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-base_ubuntu-22-04-${{ matrix.arch }}' + path: .ci-oci-image/base_ubuntu-22-04 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/base-app/ubuntu-22.04 @@ -241,6 +305,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/base:ubuntu-22.04=oci-layout://.ci-oci-image/base_ubuntu-22-04:ci-parent-image' - name: 'run serverspec' run: |- @@ -266,6 +331,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/base-app/ubuntu-22.04 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/base:ubuntu-22.04=oci-layout://.ci-oci-image/base_ubuntu-22-04:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/base-app_ubuntu-22-04' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-base-app_ubuntu-22-04-${{ matrix.arch }}' + path: .ci-oci-image/base-app_ubuntu-22-04 + retention-days: 1 + compression-level: 0 + if-no-files-found: error base-app_ubuntu-22-04_publish: name: 'webdevops/base-app:ubuntu-22.04 - Publish' runs-on: ubuntu-latest @@ -325,8 +412,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/bootstrap:alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-bootstrap_alpine-${{ matrix.arch }}' + path: .ci-oci-image/bootstrap_alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/base/alpine @@ -336,6 +431,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/base/alpine + platforms: '${{ matrix.platform }}' + load: true + 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 }}' + build-contexts: 'webdevops/bootstrap:alpine=oci-layout://.ci-oci-image/bootstrap_alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -361,6 +469,28 @@ jobs: name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" run: 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/base/alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/bootstrap:alpine=oci-layout://.ci-oci-image/bootstrap_alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/base_alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-base_alpine-${{ matrix.arch }}' + path: .ci-oci-image/base_alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error base_alpine_publish: name: 'webdevops/base:alpine - Publish' runs-on: ubuntu-latest @@ -418,8 +548,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/bootstrap:ubuntu-22.04' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-bootstrap_ubuntu-22-04-${{ matrix.arch }}' + path: .ci-oci-image/bootstrap_ubuntu-22-04 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/base/ubuntu-22.04 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/base/ubuntu-22.04 @@ -429,6 +579,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/bootstrap:ubuntu-22.04=oci-layout://.ci-oci-image/bootstrap_ubuntu-22-04:ci-parent-image' - name: 'run serverspec' run: |- @@ -454,6 +605,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/base/ubuntu-22.04 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/bootstrap:ubuntu-22.04=oci-layout://.ci-oci-image/bootstrap_ubuntu-22-04:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/base_ubuntu-22-04' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-base_ubuntu-22-04-${{ matrix.arch }}' + path: .ci-oci-image/base_ubuntu-22-04 + retention-days: 1 + compression-level: 0 + if-no-files-found: error base_ubuntu-22-04_publish: name: 'webdevops/base:ubuntu-22.04 - Publish' runs-on: ubuntu-latest @@ -513,8 +686,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/bootstrap/alpine + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/bootstrap/alpine @@ -524,6 +717,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -549,6 +743,28 @@ jobs: name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" run: 'docker push "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/bootstrap/alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/bootstrap_alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-bootstrap_alpine-${{ matrix.arch }}' + path: .ci-oci-image/bootstrap_alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error bootstrap_alpine_publish: name: 'webdevops/bootstrap:alpine - Publish' runs-on: ubuntu-latest @@ -606,8 +822,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/bootstrap/ubuntu-22.04 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/bootstrap/ubuntu-22.04 @@ -617,6 +853,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -642,6 +879,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/bootstrap/ubuntu-22.04 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/bootstrap_ubuntu-22-04' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-bootstrap_ubuntu-22-04-${{ matrix.arch }}' + path: .ci-oci-image/bootstrap_ubuntu-22-04 + retention-days: 1 + compression-level: 0 + if-no-files-found: error bootstrap_ubuntu-22-04_publish: name: 'webdevops/bootstrap:ubuntu-22.04 - Publish' runs-on: ubuntu-latest @@ -701,8 +960,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/base-app:ubuntu-22.04' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-base-app_ubuntu-22-04-${{ matrix.arch }}' + path: .ci-oci-image/base-app_ubuntu-22-04 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/dockerfile-build-env/latest @@ -712,6 +979,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-latest' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/base-app:ubuntu-22.04=oci-layout://.ci-oci-image/base-app_ubuntu-22-04:ci-parent-image' - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -781,8 +1061,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/base:alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-base_alpine-${{ matrix.arch }}' + path: .ci-oci-image/base_alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/nginx/alpine + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/nginx/alpine @@ -792,6 +1092,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/base:alpine=oci-layout://.ci-oci-image/base_alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -869,8 +1170,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-apache:8.1' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-apache_8-1-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-1 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.1' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.1 @@ -880,6 +1201,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-apache:8.1=oci-layout://.ci-oci-image/php-apache_8-1:ci-parent-image' - name: 'run serverspec' run: |- @@ -923,8 +1245,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-apache:8.1-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-apache_8-1-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-1-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.1-alpine @@ -934,6 +1276,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-apache:8.1-alpine=oci-layout://.ci-oci-image/php-apache_8-1-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -1045,8 +1388,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-apache:8.2' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-apache_8-2-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-2 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.2 @@ -1056,6 +1407,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-apache:8.2=oci-layout://.ci-oci-image/php-apache_8-2:ci-parent-image' - name: 'run serverspec' run: |- @@ -1099,8 +1463,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-apache:8.2-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-apache_8-2-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-2-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.2-alpine @@ -1110,6 +1494,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-apache:8.2-alpine=oci-layout://.ci-oci-image/php-apache_8-2-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -1221,8 +1606,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-apache:8.3' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-apache_8-3-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-3 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.3 @@ -1232,6 +1637,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-apache:8.3=oci-layout://.ci-oci-image/php-apache_8-3:ci-parent-image' - name: 'run serverspec' run: |- @@ -1275,8 +1681,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-apache:8.3-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-apache_8-3-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-3-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.3-alpine @@ -1286,6 +1712,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-apache:8.3-alpine=oci-layout://.ci-oci-image/php-apache_8-3-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -1397,8 +1824,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-apache:8.4' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-apache_8-4-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-4 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.4 @@ -1408,6 +1843,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-apache:8.4=oci-layout://.ci-oci-image/php-apache_8-4:ci-parent-image' - name: 'run serverspec' run: |- @@ -1451,8 +1899,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-apache:8.4-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-apache_8-4-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-4-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.4-alpine @@ -1462,6 +1930,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-apache:8.4-alpine=oci-layout://.ci-oci-image/php-apache_8-4-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -1573,8 +2042,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-apache:8.5' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-apache_8-5-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-5 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.5 @@ -1585,14 +2062,27 @@ jobs: 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-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 - - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-apache:8.5=oci-layout://.ci-oci-image/php-apache_8-5:ci-parent-image' + - + name: 'run serverspec' + run: |- + cd tests/serverspec + 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 + - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' uses: docker/login-action@v3 @@ -1627,8 +2117,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-apache:8.5-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-apache_8-5-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-5-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache-dev/8.5-alpine @@ -1638,6 +2148,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-apache:8.5-alpine=oci-layout://.ci-oci-image/php-apache_8-5-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -1749,8 +2260,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.1' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-1-${{ matrix.arch }}' + path: .ci-oci-image/php_8-1 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.1 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache/8.1 @@ -1760,6 +2291,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.1=oci-layout://.ci-oci-image/php_8-1:ci-parent-image' - name: 'run serverspec' run: |- @@ -1780,6 +2312,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.1 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.1=oci-layout://.ci-oci-image/php_8-1:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-1' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-apache_8-1-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-1 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-apache_8-1-alpine: strategy: fail-fast: false @@ -1803,8 +2357,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.1-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-1-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-1-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache/8.1-alpine @@ -1814,6 +2388,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.1-alpine=oci-layout://.ci-oci-image/php_8-1-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -1834,6 +2409,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.1-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.1-alpine=oci-layout://.ci-oci-image/php_8-1-alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-1-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-apache_8-1-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-1-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-apache_8-1-alpine_publish: name: 'webdevops/php-apache:8.1-alpine - Publish' runs-on: ubuntu-latest @@ -1925,8 +2522,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.2' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-2-${{ matrix.arch }}' + path: .ci-oci-image/php_8-2 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache/8.2 @@ -1936,6 +2541,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.2 + platforms: '${{ matrix.platform }}' + load: true + 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 }}' + build-contexts: 'webdevops/php:8.2=oci-layout://.ci-oci-image/php_8-2:ci-parent-image' - name: 'run serverspec' run: |- @@ -1956,6 +2574,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.2 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.2=oci-layout://.ci-oci-image/php_8-2:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-2' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-apache_8-2-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-2 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-apache_8-2-alpine: strategy: fail-fast: false @@ -1979,8 +2619,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-2-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-2-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache/8.2-alpine @@ -1990,6 +2650,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.2-alpine=oci-layout://.ci-oci-image/php_8-2-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -2010,6 +2671,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.2-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.2-alpine=oci-layout://.ci-oci-image/php_8-2-alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-2-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-apache_8-2-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-2-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-apache_8-2-alpine_publish: name: 'webdevops/php-apache:8.2-alpine - Publish' runs-on: ubuntu-latest @@ -2101,8 +2784,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.3' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-3-${{ matrix.arch }}' + path: .ci-oci-image/php_8-3 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.3 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache/8.3 @@ -2112,6 +2815,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.3=oci-layout://.ci-oci-image/php_8-3:ci-parent-image' - name: 'run serverspec' run: |- @@ -2132,6 +2836,28 @@ jobs: name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.3 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.3=oci-layout://.ci-oci-image/php_8-3:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-3' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-apache_8-3-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-3 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-apache_8-3-alpine: strategy: fail-fast: false @@ -2155,8 +2881,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-3-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-3-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache/8.3-alpine @@ -2166,6 +2900,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.3-alpine=oci-layout://.ci-oci-image/php_8-3-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -2186,6 +2933,28 @@ jobs: name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.3-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.3-alpine=oci-layout://.ci-oci-image/php_8-3-alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-3-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-apache_8-3-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-3-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-apache_8-3-alpine_publish: name: 'webdevops/php-apache:8.3-alpine - Publish' runs-on: ubuntu-latest @@ -2277,8 +3046,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.4' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-4-${{ matrix.arch }}' + path: .ci-oci-image/php_8-4 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.4 + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache/8.4 @@ -2288,6 +3077,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.4=oci-layout://.ci-oci-image/php_8-4:ci-parent-image' - name: 'run serverspec' run: |- @@ -2308,6 +3098,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.4 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.4=oci-layout://.ci-oci-image/php_8-4:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-4' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-apache_8-4-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-4 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-apache_8-4-alpine: strategy: fail-fast: false @@ -2331,8 +3143,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-4-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-4-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache/8.4-alpine @@ -2342,6 +3174,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.4-alpine=oci-layout://.ci-oci-image/php_8-4-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -2362,6 +3195,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.4-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.4-alpine=oci-layout://.ci-oci-image/php_8-4-alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-4-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-apache_8-4-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-4-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-apache_8-4-alpine_publish: name: 'webdevops/php-apache:8.4-alpine - Publish' runs-on: ubuntu-latest @@ -2453,8 +3308,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.5' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-5-${{ matrix.arch }}' + path: .ci-oci-image/php_8-5 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache/8.5 @@ -2464,6 +3327,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.5 + platforms: '${{ matrix.platform }}' + load: true + 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 }}' + build-contexts: 'webdevops/php:8.5=oci-layout://.ci-oci-image/php_8-5:ci-parent-image' - name: 'run serverspec' run: |- @@ -2484,6 +3360,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.5 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.5=oci-layout://.ci-oci-image/php_8-5:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-5' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-apache_8-5-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-5 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-apache_8-5-alpine: strategy: fail-fast: false @@ -2507,8 +3405,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-5-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-5-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-apache/8.5-alpine @@ -2518,6 +3436,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.5-alpine=oci-layout://.ci-oci-image/php_8-5-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -2538,6 +3457,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-apache/8.5-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.5-alpine=oci-layout://.ci-oci-image/php_8-5-alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-5-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-apache_8-5-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-apache_8-5-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-apache_8-5-alpine_publish: name: 'webdevops/php-apache:8.5-alpine - Publish' runs-on: ubuntu-latest @@ -2629,8 +3570,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.1' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-1-${{ matrix.arch }}' + path: .ci-oci-image/php_8-1 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-dev/8.1 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-dev/8.1 @@ -2640,6 +3601,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.1=oci-layout://.ci-oci-image/php_8-1:ci-parent-image' - name: 'run serverspec' run: |- @@ -2688,8 +3650,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.1-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-1-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-1-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-dev/8.1-alpine @@ -2699,6 +3681,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.1-alpine=oci-layout://.ci-oci-image/php_8-1-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -2815,8 +3798,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.2' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-2-${{ matrix.arch }}' + path: .ci-oci-image/php_8-2 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-dev/8.2 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-dev/8.2 @@ -2826,6 +3829,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.2=oci-layout://.ci-oci-image/php_8-2:ci-parent-image' - name: 'run serverspec' run: |- @@ -2874,8 +3878,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-2-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-2-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-dev/8.2-alpine @@ -2885,6 +3909,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.2-alpine=oci-layout://.ci-oci-image/php_8-2-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -3001,8 +4026,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.3' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-3-${{ matrix.arch }}' + path: .ci-oci-image/php_8-3 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-dev/8.3 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-dev/8.3 @@ -3012,6 +4057,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.3=oci-layout://.ci-oci-image/php_8-3:ci-parent-image' - name: 'run serverspec' run: |- @@ -3060,8 +4106,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-3-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-3-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-dev/8.3-alpine + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-dev/8.3-alpine @@ -3071,6 +4137,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.3-alpine=oci-layout://.ci-oci-image/php_8-3-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -3187,8 +4254,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.4' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-4-${{ matrix.arch }}' + path: .ci-oci-image/php_8-4 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-dev/8.4 + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-dev/8.4 @@ -3198,6 +4285,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.4=oci-layout://.ci-oci-image/php_8-4:ci-parent-image' - name: 'run serverspec' run: |- @@ -3246,8 +4334,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-4-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-4-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-dev/8.4-alpine @@ -3257,6 +4365,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.4-alpine=oci-layout://.ci-oci-image/php_8-4-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -3373,8 +4482,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.5' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-5-${{ matrix.arch }}' + path: .ci-oci-image/php_8-5 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-dev/8.5 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-dev/8.5 @@ -3384,6 +4513,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.5=oci-layout://.ci-oci-image/php_8-5:ci-parent-image' - name: 'run serverspec' run: |- @@ -3432,8 +4562,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-5-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-5-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-dev/8.5-alpine @@ -3443,6 +4593,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.5-alpine=oci-layout://.ci-oci-image/php_8-5-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -3559,8 +4710,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-nginx:8.1' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-nginx_8-1-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-1 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.1' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.1 @@ -3570,6 +4741,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-nginx:8.1=oci-layout://.ci-oci-image/php-nginx_8-1:ci-parent-image' - name: 'run serverspec' run: |- @@ -3613,8 +4785,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-nginx:8.1-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-nginx_8-1-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-1-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.1-alpine @@ -3624,6 +4816,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-nginx:8.1-alpine=oci-layout://.ci-oci-image/php-nginx_8-1-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -3736,7 +4929,27 @@ jobs: - uses: docker/setup-buildx-action@v3 - - name: 'Build (load locally)' + name: 'Download parent image (OCI layout): webdevops/php-nginx:8.2' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-nginx_8-2-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-2 + - + name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.2 @@ -3746,6 +4959,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-nginx:8.2=oci-layout://.ci-oci-image/php-nginx_8-2:ci-parent-image' - name: 'run serverspec' run: |- @@ -3789,8 +5003,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-nginx:8.2-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-nginx_8-2-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-2-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.2-alpine @@ -3800,6 +5034,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-nginx:8.2-alpine=oci-layout://.ci-oci-image/php-nginx_8-2-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -3911,8 +5146,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-nginx:8.3' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-nginx_8-3-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-3 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.3 @@ -3922,6 +5177,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-nginx:8.3=oci-layout://.ci-oci-image/php-nginx_8-3:ci-parent-image' - name: 'run serverspec' run: |- @@ -3965,8 +5221,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-nginx:8.3-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-nginx_8-3-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-3-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.3-alpine @@ -3976,6 +5252,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-nginx:8.3-alpine=oci-layout://.ci-oci-image/php-nginx_8-3-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -4087,8 +5364,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-nginx:8.4' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-nginx_8-4-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-4 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.4 @@ -4098,6 +5395,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-nginx:8.4=oci-layout://.ci-oci-image/php-nginx_8-4:ci-parent-image' - name: 'run serverspec' run: |- @@ -4141,8 +5439,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-nginx:8.4-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-nginx_8-4-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-4-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.4-alpine @@ -4152,6 +5470,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-nginx:8.4-alpine=oci-layout://.ci-oci-image/php-nginx_8-4-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -4263,8 +5582,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-nginx:8.5' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-nginx_8-5-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-5 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.5 @@ -4274,6 +5613,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-nginx:8.5=oci-layout://.ci-oci-image/php-nginx_8-5:ci-parent-image' - name: 'run serverspec' run: |- @@ -4317,8 +5657,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php-nginx:8.5-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php-nginx_8-5-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-5-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx-dev/8.5-alpine @@ -4328,6 +5688,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php-nginx:8.5-alpine=oci-layout://.ci-oci-image/php-nginx_8-5-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -4439,8 +5800,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.1' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-1-${{ matrix.arch }}' + path: .ci-oci-image/php_8-1 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.1 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.1 @@ -4450,6 +5831,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.1=oci-layout://.ci-oci-image/php_8-1:ci-parent-image' - name: 'run serverspec' run: |- @@ -4475,6 +5857,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.1 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.1=oci-layout://.ci-oci-image/php_8-1:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-1' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-nginx_8-1-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-1 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-nginx_8-1-alpine: strategy: fail-fast: false @@ -4498,8 +5902,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.1-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-1-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-1-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.1-alpine @@ -4509,6 +5933,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.1-alpine=oci-layout://.ci-oci-image/php_8-1-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -4534,6 +5959,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.1-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.1-alpine=oci-layout://.ci-oci-image/php_8-1-alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-1-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-nginx_8-1-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-1-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-nginx_8-1-alpine_publish: name: 'webdevops/php-nginx:8.1-alpine - Publish' runs-on: ubuntu-latest @@ -4625,8 +6072,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.2' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-2-${{ matrix.arch }}' + path: .ci-oci-image/php_8-2 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.2 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.2 @@ -4636,6 +6103,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.2=oci-layout://.ci-oci-image/php_8-2:ci-parent-image' - name: 'run serverspec' run: |- @@ -4661,6 +6129,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.2 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.2=oci-layout://.ci-oci-image/php_8-2:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-2' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-nginx_8-2-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-2 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-nginx_8-2-alpine: strategy: fail-fast: false @@ -4684,8 +6174,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-2-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-2-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.2-alpine @@ -4695,6 +6205,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.2-alpine=oci-layout://.ci-oci-image/php_8-2-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -4720,6 +6231,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.2-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.2-alpine=oci-layout://.ci-oci-image/php_8-2-alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-2-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-nginx_8-2-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-2-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-nginx_8-2-alpine_publish: name: 'webdevops/php-nginx:8.2-alpine - Publish' runs-on: ubuntu-latest @@ -4811,8 +6344,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.3' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-3-${{ matrix.arch }}' + path: .ci-oci-image/php_8-3 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.3 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.3 @@ -4822,6 +6375,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.3=oci-layout://.ci-oci-image/php_8-3:ci-parent-image' - name: 'run serverspec' run: |- @@ -4847,6 +6401,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.3 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.3=oci-layout://.ci-oci-image/php_8-3:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-3' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-nginx_8-3-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-3 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-nginx_8-3-alpine: strategy: fail-fast: false @@ -4870,8 +6446,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-3-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-3-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.3-alpine @@ -4881,6 +6477,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.3-alpine=oci-layout://.ci-oci-image/php_8-3-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -4906,6 +6503,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.3-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.3-alpine=oci-layout://.ci-oci-image/php_8-3-alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-3-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-nginx_8-3-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-3-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-nginx_8-3-alpine_publish: name: 'webdevops/php-nginx:8.3-alpine - Publish' runs-on: ubuntu-latest @@ -4997,8 +6616,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.4' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-4-${{ matrix.arch }}' + path: .ci-oci-image/php_8-4 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.4 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.4 @@ -5008,6 +6647,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.4=oci-layout://.ci-oci-image/php_8-4:ci-parent-image' - name: 'run serverspec' run: |- @@ -5033,6 +6673,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.4 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.4=oci-layout://.ci-oci-image/php_8-4:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-4' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-nginx_8-4-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-4 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-nginx_8-4-alpine: strategy: fail-fast: false @@ -5056,8 +6718,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-4-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-4-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.4-alpine @@ -5067,6 +6749,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.4-alpine=oci-layout://.ci-oci-image/php_8-4-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -5092,6 +6775,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.4-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.4-alpine=oci-layout://.ci-oci-image/php_8-4-alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-4-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-nginx_8-4-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-4-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-nginx_8-4-alpine_publish: name: 'webdevops/php-nginx:8.4-alpine - Publish' runs-on: ubuntu-latest @@ -5184,7 +6889,27 @@ jobs: - uses: docker/setup-buildx-action@v3 - - name: 'Build (load locally)' + name: 'Download parent image (OCI layout): webdevops/php:8.5' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-5-${{ matrix.arch }}' + path: .ci-oci-image/php_8-5 + - + name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.5 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.5 @@ -5194,6 +6919,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.5=oci-layout://.ci-oci-image/php_8-5:ci-parent-image' - name: 'run serverspec' run: |- @@ -5219,6 +6945,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.5 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.5=oci-layout://.ci-oci-image/php_8-5:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-5' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-nginx_8-5-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-5 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-nginx_8-5-alpine: strategy: fail-fast: false @@ -5242,8 +6990,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-php_8-5-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-5-alpine - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-nginx/8.5-alpine @@ -5253,6 +7009,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + 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:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.5-alpine=oci-layout://.ci-oci-image/php_8-5-alpine:ci-parent-image' - name: 'run serverspec' run: |- @@ -5278,6 +7047,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-nginx/8.5-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/php:8.5-alpine=oci-layout://.ci-oci-image/php_8-5-alpine:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-5-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php-nginx_8-5-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php-nginx_8-5-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php-nginx_8-5-alpine_publish: name: 'webdevops/php-nginx:8.5-alpine - Publish' runs-on: ubuntu-latest @@ -5369,8 +7160,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.1 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-official/8.1 @@ -5380,6 +7191,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -5405,6 +7217,28 @@ jobs: name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.1 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-1' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php_8-1-${{ matrix.arch }}' + path: .ci-oci-image/php_8-1 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php_8-1-alpine: strategy: fail-fast: false @@ -5428,8 +7262,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.1-alpine + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-official/8.1-alpine @@ -5439,6 +7293,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -5464,6 +7319,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.1-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-1-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php_8-1-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-1-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php_8-1-alpine_publish: name: 'webdevops/php:8.1-alpine - Publish' runs-on: ubuntu-latest @@ -5559,8 +7436,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.2 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-official/8.2 @@ -5570,6 +7467,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -5595,6 +7493,28 @@ jobs: name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.2 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-2' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php_8-2-${{ matrix.arch }}' + path: .ci-oci-image/php_8-2 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php_8-2-alpine: strategy: fail-fast: false @@ -5618,8 +7538,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-official/8.2-alpine @@ -5629,6 +7557,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.2-alpine + platforms: '${{ matrix.platform }}' + load: true + 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 }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -5654,6 +7595,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.2-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-2-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php_8-2-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-2-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php_8-2-alpine_publish: name: 'webdevops/php:8.2-alpine - Publish' runs-on: ubuntu-latest @@ -5749,8 +7712,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.3 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-official/8.3 @@ -5760,6 +7743,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -5785,6 +7769,28 @@ jobs: name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.3 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-3' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php_8-3-${{ matrix.arch }}' + path: .ci-oci-image/php_8-3 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php_8-3-alpine: strategy: fail-fast: false @@ -5808,8 +7814,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.3-alpine + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-official/8.3-alpine @@ -5819,6 +7845,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -5844,6 +7871,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.3-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-3-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php_8-3-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-3-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php_8-3-alpine_publish: name: 'webdevops/php:8.3-alpine - Publish' runs-on: ubuntu-latest @@ -5939,8 +7988,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.4 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-official/8.4 @@ -5950,6 +8019,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -5975,6 +8045,28 @@ jobs: name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.4 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-4' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php_8-4-${{ matrix.arch }}' + path: .ci-oci-image/php_8-4 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php_8-4-alpine: strategy: fail-fast: false @@ -5998,8 +8090,16 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-official/8.4-alpine @@ -6009,6 +8109,19 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + - + name: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.4-alpine + platforms: '${{ matrix.platform }}' + load: true + 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 }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -6034,6 +8147,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.4-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-4-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php_8-4-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-4-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php_8-4-alpine_publish: name: 'webdevops/php:8.4-alpine - Publish' runs-on: ubuntu-latest @@ -6129,8 +8264,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.5 + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-official/8.5 @@ -6140,6 +8295,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -6165,6 +8321,28 @@ jobs: name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.5 + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-5' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php_8-5-${{ matrix.arch }}' + path: .ci-oci-image/php_8-5 + retention-days: 1 + compression-level: 0 + if-no-files-found: error php_8-5-alpine: strategy: fail-fast: false @@ -6188,8 +8366,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/toolbox:latest' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.5-alpine + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/php-official/8.5-alpine @@ -6199,6 +8397,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'run serverspec' run: |- @@ -6224,6 +8423,28 @@ jobs: 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' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/php-official/8.5-alpine + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-5-alpine' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-php_8-5-alpine-${{ matrix.arch }}' + path: .ci-oci-image/php_8-5-alpine + retention-days: 1 + compression-level: 0 + if-no-files-found: error php_8-5-alpine_publish: name: 'webdevops/php:8.5-alpine - Publish' runs-on: ubuntu-latest @@ -6422,6 +8643,27 @@ jobs: name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" run: 'docker push "ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}"-latest' + - + name: 'Export image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/toolbox/latest + platforms: '${{ matrix.platform }}' + cache-from: type=gha + cache-to: 'type=gha,mode=max' + build-args: 'TARGETARCH=${{ matrix.arch }}' + outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/toolbox_latest' + - + name: 'Upload image (OCI layout)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/upload-artifact@v4 + with: + name: 'docker-parent-toolbox_latest-${{ matrix.arch }}' + path: .ci-oci-image/toolbox_latest + retention-days: 1 + compression-level: 0 + if-no-files-found: error toolbox_latest_publish: name: 'webdevops/toolbox:latest - Publish' runs-on: ubuntu-latest @@ -6479,8 +8721,28 @@ jobs: uses: actions/checkout@v6 - uses: docker/setup-buildx-action@v3 + - + name: 'Download parent image (OCI layout): webdevops/base:ubuntu-22.04' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: actions/download-artifact@v4.1.9 + with: + name: 'docker-parent-base_ubuntu-22-04-${{ matrix.arch }}' + path: .ci-oci-image/base_ubuntu-22-04 - name: 'Build (load locally)' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/build-push-action@v6 + with: + context: docker/vsftp/latest + platforms: '${{ matrix.platform }}' + load: true + 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: 'Build (load locally, from parent artifact)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v6 with: context: docker/vsftp/latest @@ -6490,6 +8752,7 @@ jobs: cache-from: type=gha cache-to: 'type=gha,mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + build-contexts: 'webdevops/base:latest=oci-layout://.ci-oci-image/base_ubuntu-22-04:ci-parent-image' - name: 'run serverspec' run: |- diff --git a/ci/src/Commands/GithubCommand.php b/ci/src/Commands/GithubCommand.php index 65714205a..96b7c36a8 100644 --- a/ci/src/Commands/GithubCommand.php +++ b/ci/src/Commands/GithubCommand.php @@ -59,7 +59,18 @@ protected function execute(InputInterface $input, OutputInterface $output) 'schedule' => [ ['cron' => '0 0 * * *'], // every week on Tuesday ], - 'push' => null, + // Restricted to 'master' so a PR branch's commits are only + // ever built once, via the 'pull_request' event below. A + // broad `push: null` trigger (any branch) would otherwise + // fire a second, fully duplicate run of the whole pipeline + // (build, test, and the OCI artifact dance) for the exact + // same commit as its corresponding pull_request run. Master + // itself is never reached by 'pull_request' (it has no PR + // targeting itself), so its push-triggered publish path is + // unaffected. + 'push' => [ + 'branches' => ['master'], + ], 'pull_request' => [ 'branches' => ['master'], ], @@ -82,6 +93,14 @@ private function traverse(Node $node): void $line = 'Processing ' . $node->getName(); $nodeAr = $node->toArray(); $nodeAr['level'] = $node->getLevel(); + $nodeAr['hasChildren'] = $node->hasChildren(); + // BlueM\Tree\Node lowercases all property keys internally, so the + // 'imageParent' key set by FileReader comes back as 'imageparent'. + // Restore the expected casing here, once, for consumers like + // GithubJobBuilder. + $nodeAr['imageParent'] = $nodeAr['imageparent'] ?? 0; + $nodeAr['imageParentRef'] = $nodeAr['imageparentref'] ?? 0; + $nodeAr['imageDependencies'] = $nodeAr['imagedependencies'] ?? []; if ($node->getLevel() > $this->deepestLevel) { $this->deepestLevel = $node->getLevel(); } diff --git a/ci/src/FileReader.php b/ci/src/FileReader.php index faebfbc8a..40a3675bc 100644 --- a/ci/src/FileReader.php +++ b/ci/src/FileReader.php @@ -42,6 +42,9 @@ public function getInfo(string $dockerfilePath) 'aliases' => [], 'file' => $dockerfilePath, 'parent' => 0, + 'imageParent' => 0, + 'imageParentRef' => null, + 'imageDependencies' => [], 'serverspec' => [ 'DOCKER_IMAGE' => $id, 'DOCKER_TAG' => $tagName, @@ -57,16 +60,38 @@ public function getInfo(string $dockerfilePath) } } // Only internal images must be contained in build tree - preg_match_all('/FROM (.*)/', $content, $fromMatches); + preg_match_all('/^FROM\s+(\S+)(?:\s+AS\s+\S+)?\s*$/mi', $content, $fromMatches); $parentImage = array_pop($fromMatches[1]); if (strpos($parentImage, 'webdevops/') === 0) { - if (str_ends_with($parentImage, ':latest')) { - $parentImage = str_replace(':latest', ':' . $this->_settings['docker']['autoLatestTag'], $parentImage); - } - $node['parent'] = $parentImage; + // Real Docker image inheritance: the Dockerfile's FROM references + // another internal webdevops/* image. This is the only case where + // 'imageParent' driven OCI artifact propagation (build-contexts + // override) is valid. 'imageParentRef' keeps the *exact* literal + // text used in the FROM statement (e.g. "webdevops/base:latest"), + // because that is the key BuildKit matches against when a + // `build-contexts` override is supplied; it must NOT be the + // resolved/aliased image id, or the override silently fails to + // apply and the build falls back to pulling the published image. + $node['parent'] = $this->resolveInternalImageReference($parentImage); + $node['imageParent'] = $node['parent']; + $node['imageParentRef'] = $parentImage; } else if ($node['id'] !== 'webdevops/toolbox:latest') { + // Synthetic scheduling dependency only (e.g. to serialize CI + // against the Toolbox job). The Dockerfile does NOT actually + // build FROM this image, so it must never drive OCI artifact + // download/upload or build-contexts overrides. $node['parent'] = 'webdevops/toolbox:latest'; } + // Additional internal image dependencies referenced via + // `COPY --from=webdevops/...` (not a FROM parent). BuildKit's named + // build-context override mechanism applies identically to + // `COPY --from=` references, so these need the exact same OCI + // artifact propagation as a real FROM parent, otherwise the copied + // files still come from the published registry image. + preg_match_all('/^COPY\s+--from=(webdevops\/\S+)/m', $content, $copyFromMatches); + foreach (array_unique($copyFromMatches[1]) as $dependencyRef) { + $node['imageDependencies'][$dependencyRef] = $this->resolveInternalImageReference($dependencyRef); + } // Treat *-official images if (strpos($id, '-official:') !== false) { $node['aliases'][] = $id; @@ -79,4 +104,41 @@ public function getInfo(string $dockerfilePath) return $node; } + /** + * Resolve a literal internal `webdevops/[:]` reference, as it + * appears in a `FROM` or `COPY --from=` statement, to the exact image id + * that is actually built by this repository's CI pipeline (i.e. the id + * backed by a real `docker///Dockerfile`). + * + * This is the single source of truth for resolving a `:latest` (or + * untagged, which Docker treats identically) reference: most images do + * not have a literal "latest" subdirectory, so `:latest` is only a + * published alias for whichever folder `autoLatestTag` points to, and a + * reference like "webdevops/base:latest" must resolve to + * "webdevops/base:ubuntu-22.04" to match the job that actually builds + * and exports it. A few images (e.g. toolbox, ssh, vsftp) *do* have a + * literal "latest" subdirectory and must be left untouched. Checking the + * filesystem directly, rather than assuming the "latest" alias + * substitution always applies, keeps this correct for both cases. + */ + private function resolveInternalImageReference(string $reference): string + { + $imageAndTag = substr($reference, strlen('webdevops/')); + if (strpos($imageAndTag, ':') !== false) { + [$image, $tag] = explode(':', $imageAndTag, 2); + } else { + // `COPY --from=webdevops/toolbox` has no explicit tag; Docker + // treats an untagged reference as `:latest`. + $image = $imageAndTag; + $tag = 'latest'; + } + $dockerfileExists = fn (string $tag): bool => file_exists( + __DIR__ . '/../../docker/' . $image . '/' . $tag . '/Dockerfile', + ); + if ($tag === 'latest' && !$dockerfileExists($tag) && $dockerfileExists($this->_settings['docker']['autoLatestTag'])) { + $tag = $this->_settings['docker']['autoLatestTag']; + } + return 'webdevops/' . $image . ':' . $tag; + } + } diff --git a/ci/src/GithubJobBuilder.php b/ci/src/GithubJobBuilder.php index f5679768e..773ba5b70 100644 --- a/ci/src/GithubJobBuilder.php +++ b/ci/src/GithubJobBuilder.php @@ -10,6 +10,13 @@ class GithubJobBuilder { + /** + * Tag/annotation used when exporting a parent image as an OCI layout so + * that child jobs can deterministically reference the exported manifest + * instead of relying on Buildx picking an arbitrary entry from index.json. + */ + private const PARENT_OCI_TAG = 'ci-parent-image'; + /** * @return array> */ @@ -19,7 +26,12 @@ public function getJobsDescription(array $node): array $structuredTests = $this->structuredTests($node); $jobId = GithubJobBuilder::toJobId($node['name']); - $needs = ($node['parent'] ?? null) ? GithubJobBuilder::toJobId($node['parent']) . '_publish' : 'validate-automation'; + $hasParent = (bool)($node['parent'] ?? null); + $imageDependencies = $this->imageDependencies($node); + $hasImageDependencies = !empty($imageDependencies); + $hasChildren = !empty($node['hasChildren']); + $parentJobId = $hasParent ? GithubJobBuilder::toJobId($node['parent']) : null; + $needs = $hasParent ? $parentJobId . '_publish' : 'validate-automation'; $pushTags = []; $pushTags[] = '-t "' . $node['id'] . '"'; @@ -58,21 +70,22 @@ public function getJobsDescription(array $node): array [ ['uses' => 'actions/checkout@v6'], ['uses' => 'docker/setup-buildx-action@v3'], - [ + ...$this->downloadParentImageSteps($imageDependencies), + array_filter([ 'name' => 'Build (load locally)', + 'if' => $hasImageDependencies ? '${{ github.ref == \'refs/heads/master\' }}' : null, '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 }}', - ]), - ], - ], + 'with' => $this->buildPushWith($node), + ], fn ($value): bool => $value !== null), + $hasImageDependencies ? [ + 'name' => 'Build (load locally, from parent artifact)', + 'if' => '${{ github.ref != \'refs/heads/master\' }}', + 'uses' => 'docker/build-push-action@v6', + 'with' => array_merge( + $this->buildPushWith($node), + ['build-contexts' => $this->buildContexts($imageDependencies)], + ), + ] : null, $serverSpec ? [ 'name' => 'run serverspec', 'run' => implode("\n", $serverSpec), @@ -96,6 +109,41 @@ public function getJobsDescription(array $node): array 'if' => '${{github.ref == \'refs/heads/master\'}}', 'run' => 'docker push "ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}"-' . $node['tag'], ], + $hasChildren ? [ + 'name' => 'Export image (OCI layout)', + 'if' => '${{ github.ref != \'refs/heads/master\' }}', + 'uses' => 'docker/build-push-action@v6', + 'with' => array_merge( + [ + 'context' => dirname(str_replace(__DIR__ . '/../../', '', $node['file'])), + 'platforms' => '${{ matrix.platform }}', + 'cache-from' => 'type=gha', + 'cache-to' => 'type=gha,mode=max', + 'build-args' => implode("\n", [ + 'TARGETARCH=${{ matrix.arch }}', + ]), + ], + // Must use the exact same build-contexts override as the + // tested build above, otherwise this second Buildx invocation + // silently re-resolves FROM/COPY --from references against the + // published registry images and the exported artifact no + // longer reflects the tested result. + $hasImageDependencies ? ['build-contexts' => $this->buildContexts($imageDependencies)] : [], + ['outputs' => 'type=oci,tar=false,name=' . self::PARENT_OCI_TAG . ',dest=' . $this->getCiImagePath($node['id'])], + ), + ] : null, + $hasChildren ? [ + 'name' => 'Upload image (OCI layout)', + 'if' => '${{ github.ref != \'refs/heads/master\' }}', + 'uses' => 'actions/upload-artifact@v4', + 'with' => [ + 'name' => $this->getCiImageArtifactName($node['id']), + 'path' => $this->getCiImagePath($node['id']), + 'retention-days' => 1, + 'compression-level' => 0, + 'if-no-files-found' => 'error', + ], + ] : null, ], ), ), @@ -156,6 +204,120 @@ public static function toJobId(string $name): string return $name; } + /** + * Common `docker/build-push-action` inputs shared by the local build step + * and the additional per-node variants (parent-context build, OCI export). + */ + private function buildPushWith(array $node): array + { + return [ + '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 }}', + ]), + ]; + } + + /** + * All internal webdevops/* images this node needs a same-run OCI + * artifact override for: its real FROM parent (if any) plus any images + * referenced via `COPY --from=webdevops/...`. Keyed by the *literal* + * reference text as written in the Dockerfile (the key a Buildx + * `build-contexts` override must match exactly), valued by the resolved + * image id that identifies the job/artifact actually producing it. + * + * `node['parent']` is NOT used here on its own: it may be a purely + * synthetic scheduling dependency (e.g. on the Toolbox job for images + * whose Dockerfile does not actually FROM/COPY an internal image), which + * must never drive OCI artifact propagation. + */ + private function imageDependencies(array $node): array + { + $dependencies = []; + if (!empty($node['imageParent'])) { + $literalRef = $node['imageParentRef'] ?: $node['imageParent']; + $dependencies[$literalRef] = $node['imageParent']; + } + foreach ($node['imageDependencies'] ?? [] as $literalRef => $resolvedImage) { + $dependencies[$literalRef] = $resolvedImage; + } + return $dependencies; + } + + /** + * One "Download parent image (OCI layout)" step per distinct image id + * referenced in $imageDependencies, deduplicated so the same artifact is + * never downloaded twice (e.g. if an image happens to be both the FROM + * parent and a COPY --from target). + * + * @return array> + */ + private function downloadParentImageSteps(array $imageDependencies): array + { + $imageIds = array_unique(array_values($imageDependencies)); + return array_map(fn (string $imageId): array => [ + 'name' => 'Download parent image (OCI layout): ' . $imageId, + 'if' => '${{ github.ref != \'refs/heads/master\' }}', + 'uses' => 'actions/download-artifact@v4.1.9', + 'with' => [ + 'name' => $this->getCiImageArtifactName($imageId), + 'path' => $this->getCiImagePath($imageId), + ], + ], $imageIds); + } + + /** + * Deterministic, filesystem/artifact-safe name for the image identified + * by $imageId (e.g. "webdevops/php:8.4"), unique per architecture so + * amd64/arm64 artifacts can never collide or be cross-consumed. + */ + private function getCiImageArtifactName(string $imageId): string + { + return 'docker-parent-' . GithubJobBuilder::toJobId($imageId) . '-${{ matrix.arch }}'; + } + + /** + * Predictable, collision-free extraction/export directory for the OCI + * layout of the image identified by $imageId. + * + * Intentionally a path relative to the job's working directory (the + * checked-out repository) rather than an absolute `${{ runner.temp }}` + * path: every job in this workflow runs inside a `container:`, and + * `${{ runner.temp }}` is evaluated by the Actions runner against the + * *host* filesystem, which is only bind-mounted into the container under + * `/__w/_temp`, not under the literal host path. A relative path is + * resolved consistently by every step (checkout, Buildx, up-/download-artifact) + * against the same container working directory, avoiding that mismatch. + */ + private function getCiImagePath(string $imageId): string + { + return '.ci-oci-image/' . GithubJobBuilder::toJobId($imageId); + } + + /** + * Buildx `build-contexts` value mapping every literal FROM/COPY --from + * reference in $imageDependencies to the OCI layout downloaded from the + * corresponding parent job's artifact, so BuildKit never needs to pull + * any of those images from Docker Hub during a non-master build. Must + * be reused unchanged for every Buildx invocation of this node (tested + * build and OCI export alike), otherwise a later invocation silently + * resolves a dependency from the registry again. + */ + private function buildContexts(array $imageDependencies): string + { + $lines = []; + foreach ($imageDependencies as $literalRef => $imageId) { + $lines[] = $literalRef . '=oci-layout://' . $this->getCiImagePath($imageId) . ':' . self::PARENT_OCI_TAG; + } + return implode("\n", $lines); + } + + private function serverSpec(array $node): array { $specFile = sprintf('spec/docker/%s_spec.rb', $node['image']);