✨ add ARM into build pipeline #58
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| 'on': | |
| schedule: | |
| - | |
| cron: '0 0 * * 2' | |
| push: null | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: null | |
| jobs: | |
| validate-automation: | |
| name: 'Validate Automation' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| name: 'Validate that template/* are used to generate Dockerfiles' | |
| run: |- | |
| docker run --rm -v $PWD:/app -w /app webdevops/dockerfile-build-env make provision | |
| git diff --exit-code --color=always | |
| - | |
| name: 'Validate .github/workflows/build.yaml is up to date' | |
| run: |- | |
| docker run --rm -v $PWD:/app -w /app/ci webdevops/php:8.4-alpine composer install | |
| docker run --rm -v $PWD:/app -w /app webdevops/php:8.4-alpine ci/console github:generate-ci | |
| git diff --exit-code --color=always | |
| apache_alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/apache:alpine (${{ matrix.arch }})' | |
| needs: base_alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/apache:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/apache_spec.rb webdevops/apache:alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2FwYWNoZTphbHBpbmUiLCJET0NLRVJfVEFHIjoiYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IiIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/apache:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' | |
| apache_alpine_publish: | |
| name: 'webdevops/apache:alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: apache_alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/apache:alpine" \ | |
| -t "ghcr.io/webdevops/apache:alpine" \ | |
| "ghcr.io/webdevops/apache:sha-${{ github.sha }}-amd64-alpine" \ | |
| "ghcr.io/webdevops/apache:sha-${{ github.sha }}-arm64-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| base-app_alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/base-app:alpine (${{ matrix.arch }})' | |
| needs: base_alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/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 }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/base-app_spec.rb webdevops/base-app:alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jhc2UtYXBwOmFscGluZSIsIkRPQ0tFUl9UQUciOiJhbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-alpine --config base-app/test.yaml --config base-app/alpine/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' | |
| base-app_alpine_publish: | |
| name: 'webdevops/base-app:alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: base-app_alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/base-app:alpine" \ | |
| -t "ghcr.io/webdevops/base-app:alpine" \ | |
| "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-amd64-alpine" \ | |
| "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-arm64-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| base-app_ubuntu-22-04: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/base-app:ubuntu-22.04 (${{ matrix.arch }})' | |
| needs: base_ubuntu-22-04_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/base-app_spec.rb webdevops/base-app:ubuntu-22.04 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jhc2UtYXBwOnVidW50dS0yMi4wNCIsIkRPQ0tFUl9UQUciOiJ1YnVudHUtMjIuMDQiLCJPU19GQU1JTFkiOiJ1YnVudHUiLCJPU19WRVJTSU9OIjoiMjIuMDQiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04 --config base-app/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04' | |
| base-app_ubuntu-22-04_publish: | |
| name: 'webdevops/base-app:ubuntu-22.04 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: base-app_ubuntu-22-04 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/base-app:ubuntu-22.04" \ | |
| -t "ghcr.io/webdevops/base-app:ubuntu-22.04" \ | |
| -t "webdevops/base-app:latest" \ | |
| -t "ghcr.io/webdevops/base-app:latest" \ | |
| "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-amd64-ubuntu-22.04" \ | |
| "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-arm64-ubuntu-22.04" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| base_alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/base:alpine (${{ matrix.arch }})' | |
| needs: bootstrap_alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/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 }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/base_spec.rb webdevops/base:alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jhc2U6YWxwaW5lIiwiRE9DS0VSX1RBRyI6ImFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine --config base/test.yaml --config base/alpine/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' | |
| base_alpine_publish: | |
| name: 'webdevops/base:alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: base_alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/base:alpine" \ | |
| -t "ghcr.io/webdevops/base:alpine" \ | |
| "ghcr.io/webdevops/base:sha-${{ github.sha }}-amd64-alpine" \ | |
| "ghcr.io/webdevops/base:sha-${{ github.sha }}-arm64-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| base_ubuntu-22-04: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/base:ubuntu-22.04 (${{ matrix.arch }})' | |
| needs: bootstrap_ubuntu-22-04_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/base_spec.rb webdevops/base:ubuntu-22.04 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jhc2U6dWJ1bnR1LTIyLjA0IiwiRE9DS0VSX1RBRyI6InVidW50dS0yMi4wNCIsIk9TX0ZBTUlMWSI6InVidW50dSIsIk9TX1ZFUlNJT04iOiIyMi4wNCIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04 --config base/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04' | |
| base_ubuntu-22-04_publish: | |
| name: 'webdevops/base:ubuntu-22.04 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: base_ubuntu-22-04 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/base:ubuntu-22.04" \ | |
| -t "ghcr.io/webdevops/base:ubuntu-22.04" \ | |
| -t "webdevops/base:latest" \ | |
| -t "ghcr.io/webdevops/base:latest" \ | |
| "ghcr.io/webdevops/base:sha-${{ github.sha }}-amd64-ubuntu-22.04" \ | |
| "ghcr.io/webdevops/base:sha-${{ github.sha }}-arm64-ubuntu-22.04" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| bootstrap_alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/bootstrap:alpine (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/bootstrap_spec.rb webdevops/bootstrap:alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jvb3RzdHJhcDphbHBpbmUiLCJET0NLRVJfVEFHIjoiYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IiIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-alpine --config bootstrap/test.yaml --config bootstrap/alpine/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' | |
| bootstrap_alpine_publish: | |
| name: 'webdevops/bootstrap:alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: bootstrap_alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/bootstrap:alpine" \ | |
| -t "ghcr.io/webdevops/bootstrap:alpine" \ | |
| "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-amd64-alpine" \ | |
| "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-arm64-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| bootstrap_ubuntu-22-04: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/bootstrap:ubuntu-22.04 (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/bootstrap_spec.rb webdevops/bootstrap:ubuntu-22.04 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL2Jvb3RzdHJhcDp1YnVudHUtMjIuMDQiLCJET0NLRVJfVEFHIjoidWJ1bnR1LTIyLjA0IiwiT1NfRkFNSUxZIjoidWJ1bnR1IiwiT1NfVkVSU0lPTiI6IjIyLjA0IiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04 --config bootstrap/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04' | |
| bootstrap_ubuntu-22-04_publish: | |
| name: 'webdevops/bootstrap:ubuntu-22.04 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: bootstrap_ubuntu-22-04 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/bootstrap:ubuntu-22.04" \ | |
| -t "ghcr.io/webdevops/bootstrap:ubuntu-22.04" \ | |
| -t "webdevops/bootstrap:latest" \ | |
| -t "ghcr.io/webdevops/bootstrap:latest" \ | |
| "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-amd64-ubuntu-22.04" \ | |
| "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-arm64-ubuntu-22.04" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| dockerfile-build-env_latest: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/dockerfile-build-env:latest (${{ matrix.arch }})' | |
| needs: base-app_ubuntu-22-04_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/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 }}' | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/dockerfile-build-env:sha-${{ github.sha }}-${{ matrix.arch }}"-latest' | |
| dockerfile-build-env_latest_publish: | |
| name: 'webdevops/dockerfile-build-env:latest - Publish' | |
| runs-on: ubuntu-latest | |
| needs: dockerfile-build-env_latest | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/dockerfile-build-env:latest" \ | |
| -t "ghcr.io/webdevops/dockerfile-build-env:latest" \ | |
| "ghcr.io/webdevops/dockerfile-build-env:sha-${{ github.sha }}-amd64-latest" \ | |
| "ghcr.io/webdevops/dockerfile-build-env:sha-${{ github.sha }}-arm64-latest" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| nginx_alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/nginx:alpine (${{ matrix.arch }})' | |
| needs: base_alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/nginx_spec.rb webdevops/nginx:alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL25naW54OmFscGluZSIsIkRPQ0tFUl9UQUciOiJhbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' | |
| nginx_alpine_publish: | |
| name: 'webdevops/nginx:alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: nginx_alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/nginx:alpine" \ | |
| -t "ghcr.io/webdevops/nginx:alpine" \ | |
| "ghcr.io/webdevops/nginx:sha-${{ github.sha }}-amd64-alpine" \ | |
| "ghcr.io/webdevops/nginx:sha-${{ github.sha }}-arm64-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache-dev_8-1: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache-dev:8.1 (${{ matrix.arch }})' | |
| needs: php-apache_8-1_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMSIsIkRPQ0tFUl9UQUciOiI4LjEiLCJPU19GQU1JTFkiOiJkZWJpYW4iLCJPU19WRVJTSU9OIjoiMTIiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' | |
| php-apache-dev_8-1-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache-dev:8.1-alpine (${{ matrix.arch }})' | |
| needs: php-apache_8-1-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMS1hbHBpbmUiLCJET0NLRVJfVEFHIjoiOC4xLWFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIzIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' | |
| php-apache-dev_8-1-alpine_publish: | |
| name: 'webdevops/php-apache-dev:8.1-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache-dev_8-1-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache-dev:8.1-alpine" \ | |
| -t "ghcr.io/webdevops/php-apache-dev:8.1-alpine" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.1-alpine" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache-dev_8-1_publish: | |
| name: 'webdevops/php-apache-dev:8.1 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache-dev_8-1 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache-dev:8.1" \ | |
| -t "ghcr.io/webdevops/php-apache-dev:8.1" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.1" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.1" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache-dev_8-2: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache-dev:8.2 (${{ matrix.arch }})' | |
| needs: php-apache_8-2_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache-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 }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMiIsIkRPQ0tFUl9UQUciOiI4LjIiLCJPU19GQU1JTFkiOiJkZWJpYW4iLCJPU19WRVJTSU9OIjoiMTIiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' | |
| php-apache-dev_8-2-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache-dev:8.2-alpine (${{ matrix.arch }})' | |
| needs: php-apache_8-2-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMi1hbHBpbmUiLCJET0NLRVJfVEFHIjoiOC4yLWFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIzIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' | |
| php-apache-dev_8-2-alpine_publish: | |
| name: 'webdevops/php-apache-dev:8.2-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache-dev_8-2-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache-dev:8.2-alpine" \ | |
| -t "ghcr.io/webdevops/php-apache-dev:8.2-alpine" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.2-alpine" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache-dev_8-2_publish: | |
| name: 'webdevops/php-apache-dev:8.2 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache-dev_8-2 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache-dev:8.2" \ | |
| -t "ghcr.io/webdevops/php-apache-dev:8.2" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.2" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.2" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache-dev_8-3: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache-dev:8.3 (${{ matrix.arch }})' | |
| needs: php-apache_8-3_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMyIsIkRPQ0tFUl9UQUciOiI4LjMiLCJPU19GQU1JTFkiOiJkZWJpYW4iLCJPU19WRVJTSU9OIjoiMTIiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' | |
| php-apache-dev_8-3-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache-dev:8.3-alpine (${{ matrix.arch }})' | |
| needs: php-apache_8-3-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguMy1hbHBpbmUiLCJET0NLRVJfVEFHIjoiOC4zLWFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIzIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' | |
| php-apache-dev_8-3-alpine_publish: | |
| name: 'webdevops/php-apache-dev:8.3-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache-dev_8-3-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache-dev:8.3-alpine" \ | |
| -t "ghcr.io/webdevops/php-apache-dev:8.3-alpine" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.3-alpine" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache-dev_8-3_publish: | |
| name: 'webdevops/php-apache-dev:8.3 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache-dev_8-3 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache-dev:8.3" \ | |
| -t "ghcr.io/webdevops/php-apache-dev:8.3" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.3" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.3" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache-dev_8-4: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache-dev:8.4 (${{ matrix.arch }})' | |
| needs: php-apache_8-4_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache-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 }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguNCIsIkRPQ0tFUl9UQUciOiI4LjQiLCJPU19GQU1JTFkiOiJkZWJpYW4iLCJPU19WRVJTSU9OIjoiMTIiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' | |
| php-apache-dev_8-4-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache-dev:8.4-alpine (${{ matrix.arch }})' | |
| needs: php-apache_8-4-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguNC1hbHBpbmUiLCJET0NLRVJfVEFHIjoiOC40LWFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIzIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' | |
| php-apache-dev_8-4-alpine_publish: | |
| name: 'webdevops/php-apache-dev:8.4-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache-dev_8-4-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache-dev:8.4-alpine" \ | |
| -t "ghcr.io/webdevops/php-apache-dev:8.4-alpine" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.4-alpine" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache-dev_8-4_publish: | |
| name: 'webdevops/php-apache-dev:8.4 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache-dev_8-4 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache-dev:8.4" \ | |
| -t "ghcr.io/webdevops/php-apache-dev:8.4" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.4" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.4" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache-dev_8-5: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache-dev:8.5 (${{ matrix.arch }})' | |
| needs: php-apache_8-5_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache-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 }}' | |
| - | |
| 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 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' | |
| php-apache-dev_8-5-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache-dev:8.5-alpine (${{ matrix.arch }})' | |
| needs: php-apache_8-5-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache-dev_spec.rb webdevops/php-apache-dev:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGUtZGV2OjguNS1hbHBpbmUiLCJET0NLRVJfVEFHIjoiOC41LWFscGluZSIsIk9TX0ZBTUlMWSI6ImFscGluZSIsIk9TX1ZFUlNJT04iOiIzIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' | |
| php-apache-dev_8-5-alpine_publish: | |
| name: 'webdevops/php-apache-dev:8.5-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache-dev_8-5-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache-dev:8.5-alpine" \ | |
| -t "ghcr.io/webdevops/php-apache-dev:8.5-alpine" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.5-alpine" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache-dev_8-5_publish: | |
| name: 'webdevops/php-apache-dev:8.5 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache-dev_8-5 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache-dev:8.5" \ | |
| -t "ghcr.io/webdevops/php-apache-dev:8.5" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-amd64-8.5" \ | |
| "ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-arm64-8.5" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache_8-1: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache:8.1 (${{ matrix.arch }})' | |
| needs: php_8-1_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4xIiwiRE9DS0VSX1RBRyI6IjguMSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' | |
| php-apache_8-1-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache:8.1-alpine (${{ matrix.arch }})' | |
| needs: php_8-1-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4xLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjEtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' | |
| php-apache_8-1-alpine_publish: | |
| name: 'webdevops/php-apache:8.1-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache_8-1-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache:8.1-alpine" \ | |
| -t "ghcr.io/webdevops/php-apache:8.1-alpine" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.1-alpine" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache_8-1_publish: | |
| name: 'webdevops/php-apache:8.1 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache_8-1 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache:8.1" \ | |
| -t "ghcr.io/webdevops/php-apache:8.1" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.1" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.1" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache_8-2: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache:8.2 (${{ matrix.arch }})' | |
| needs: php_8-2_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache/8.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 }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4yIiwiRE9DS0VSX1RBRyI6IjguMiIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' | |
| php-apache_8-2-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache:8.2-alpine (${{ matrix.arch }})' | |
| needs: php_8-2-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4yLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjItYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' | |
| php-apache_8-2-alpine_publish: | |
| name: 'webdevops/php-apache:8.2-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache_8-2-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache:8.2-alpine" \ | |
| -t "ghcr.io/webdevops/php-apache:8.2-alpine" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.2-alpine" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache_8-2_publish: | |
| name: 'webdevops/php-apache:8.2 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache_8-2 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache:8.2" \ | |
| -t "ghcr.io/webdevops/php-apache:8.2" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.2" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.2" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache_8-3: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache:8.3 (${{ matrix.arch }})' | |
| needs: php_8-3_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4zIiwiRE9DS0VSX1RBRyI6IjguMyIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' | |
| php-apache_8-3-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache:8.3-alpine (${{ matrix.arch }})' | |
| needs: php_8-3-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache/8.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 }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC4zLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjMtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' | |
| php-apache_8-3-alpine_publish: | |
| name: 'webdevops/php-apache:8.3-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache_8-3-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache:8.3-alpine" \ | |
| -t "ghcr.io/webdevops/php-apache:8.3-alpine" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.3-alpine" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache_8-3_publish: | |
| name: 'webdevops/php-apache:8.3 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache_8-3 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache:8.3" \ | |
| -t "ghcr.io/webdevops/php-apache:8.3" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.3" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.3" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache_8-4: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache:8.4 (${{ matrix.arch }})' | |
| needs: php_8-4_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache/8.4 | |
| platforms: '${{ matrix.platform }}' | |
| load: true | |
| tags: 'ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' | |
| cache-from: type=gha | |
| cache-to: 'type=gha,mode=max' | |
| build-args: 'TARGETARCH=${{ matrix.arch }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC40IiwiRE9DS0VSX1RBRyI6IjguNCIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' | |
| php-apache_8-4-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache:8.4-alpine (${{ matrix.arch }})' | |
| needs: php_8-4-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache/8.4-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC40LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjQtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' | |
| php-apache_8-4-alpine_publish: | |
| name: 'webdevops/php-apache:8.4-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache_8-4-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache:8.4-alpine" \ | |
| -t "ghcr.io/webdevops/php-apache:8.4-alpine" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.4-alpine" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache_8-4_publish: | |
| name: 'webdevops/php-apache:8.4 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache_8-4 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache:8.4" \ | |
| -t "ghcr.io/webdevops/php-apache:8.4" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.4" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.4" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache_8-5: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache:8.5 (${{ matrix.arch }})' | |
| needs: php_8-5_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache/8.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 }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC41IiwiRE9DS0VSX1RBRyI6IjguNSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' | |
| php-apache_8-5-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-apache:8.5-alpine (${{ matrix.arch }})' | |
| needs: php_8-5-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-apache/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-apache_spec.rb webdevops/php-apache:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1hcGFjaGU6OC41LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjUtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' | |
| php-apache_8-5-alpine_publish: | |
| name: 'webdevops/php-apache:8.5-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache_8-5-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache:8.5-alpine" \ | |
| -t "ghcr.io/webdevops/php-apache:8.5-alpine" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.5-alpine" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-apache_8-5_publish: | |
| name: 'webdevops/php-apache:8.5 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-apache_8-5 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-apache:8.5" \ | |
| -t "ghcr.io/webdevops/php-apache:8.5" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-amd64-8.5" \ | |
| "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-arm64-8.5" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-dev_8-1: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-dev:8.1 (${{ matrix.arch }})' | |
| needs: php_8-1_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-dev/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4xIiwiRE9DS0VSX1RBRyI6IjguMSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.1 --config php-dev/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' | |
| php-dev_8-1-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-dev:8.1-alpine (${{ matrix.arch }})' | |
| needs: php_8-1-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-dev/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4xLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjEtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine --config php-dev/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' | |
| php-dev_8-1-alpine_publish: | |
| name: 'webdevops/php-dev:8.1-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-dev_8-1-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-dev:8.1-alpine" \ | |
| -t "ghcr.io/webdevops/php-dev:8.1-alpine" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.1-alpine" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-dev_8-1_publish: | |
| name: 'webdevops/php-dev:8.1 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-dev_8-1 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-dev:8.1" \ | |
| -t "ghcr.io/webdevops/php-dev:8.1" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.1" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.1" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-dev_8-2: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-dev:8.2 (${{ matrix.arch }})' | |
| needs: php_8-2_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-dev/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4yIiwiRE9DS0VSX1RBRyI6IjguMiIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2 --config php-dev/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' | |
| php-dev_8-2-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-dev:8.2-alpine (${{ matrix.arch }})' | |
| needs: php_8-2-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-dev/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4yLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjItYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine --config php-dev/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' | |
| php-dev_8-2-alpine_publish: | |
| name: 'webdevops/php-dev:8.2-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-dev_8-2-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-dev:8.2-alpine" \ | |
| -t "ghcr.io/webdevops/php-dev:8.2-alpine" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.2-alpine" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-dev_8-2_publish: | |
| name: 'webdevops/php-dev:8.2 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-dev_8-2 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-dev:8.2" \ | |
| -t "ghcr.io/webdevops/php-dev:8.2" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.2" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.2" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-dev_8-3: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-dev:8.3 (${{ matrix.arch }})' | |
| needs: php_8-3_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-dev/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4zIiwiRE9DS0VSX1RBRyI6IjguMyIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3 --config php-dev/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' | |
| php-dev_8-3-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-dev:8.3-alpine (${{ matrix.arch }})' | |
| needs: php_8-3-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-dev/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC4zLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjMtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine --config php-dev/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' | |
| php-dev_8-3-alpine_publish: | |
| name: 'webdevops/php-dev:8.3-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-dev_8-3-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-dev:8.3-alpine" \ | |
| -t "ghcr.io/webdevops/php-dev:8.3-alpine" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.3-alpine" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-dev_8-3_publish: | |
| name: 'webdevops/php-dev:8.3 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-dev_8-3 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-dev:8.3" \ | |
| -t "ghcr.io/webdevops/php-dev:8.3" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.3" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.3" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-dev_8-4: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-dev:8.4 (${{ matrix.arch }})' | |
| needs: php_8-4_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-dev/8.4 | |
| platforms: '${{ matrix.platform }}' | |
| load: true | |
| tags: 'ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' | |
| cache-from: type=gha | |
| cache-to: 'type=gha,mode=max' | |
| build-args: 'TARGETARCH=${{ matrix.arch }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC40IiwiRE9DS0VSX1RBRyI6IjguNCIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4 --config php-dev/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' | |
| php-dev_8-4-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-dev:8.4-alpine (${{ matrix.arch }})' | |
| needs: php_8-4-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-dev/8.4-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC40LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjQtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine --config php-dev/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' | |
| php-dev_8-4-alpine_publish: | |
| name: 'webdevops/php-dev:8.4-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-dev_8-4-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-dev:8.4-alpine" \ | |
| -t "ghcr.io/webdevops/php-dev:8.4-alpine" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.4-alpine" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-dev_8-4_publish: | |
| name: 'webdevops/php-dev:8.4 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-dev_8-4 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-dev:8.4" \ | |
| -t "ghcr.io/webdevops/php-dev:8.4" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.4" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.4" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-dev_8-5: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-dev:8.5 (${{ matrix.arch }})' | |
| needs: php_8-5_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-dev/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC41IiwiRE9DS0VSX1RBRyI6IjguNSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5 --config php-dev/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' | |
| php-dev_8-5-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-dev:8.5-alpine (${{ matrix.arch }})' | |
| needs: php_8-5-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-dev/8.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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-dev_spec.rb webdevops/php-dev:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1kZXY6OC41LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjUtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine --config php-dev/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' | |
| php-dev_8-5-alpine_publish: | |
| name: 'webdevops/php-dev:8.5-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-dev_8-5-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-dev:8.5-alpine" \ | |
| -t "ghcr.io/webdevops/php-dev:8.5-alpine" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.5-alpine" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-dev_8-5_publish: | |
| name: 'webdevops/php-dev:8.5 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-dev_8-5 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-dev:8.5" \ | |
| -t "ghcr.io/webdevops/php-dev:8.5" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-amd64-8.5" \ | |
| "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-arm64-8.5" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx-dev_8-1: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx-dev:8.1 (${{ matrix.arch }})' | |
| needs: php-nginx_8-1_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4xIiwiRE9DS0VSX1RBRyI6IjguMSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' | |
| php-nginx-dev_8-1-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx-dev:8.1-alpine (${{ matrix.arch }})' | |
| needs: php-nginx_8-1-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4xLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjEtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' | |
| php-nginx-dev_8-1-alpine_publish: | |
| name: 'webdevops/php-nginx-dev:8.1-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx-dev_8-1-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx-dev:8.1-alpine" \ | |
| -t "ghcr.io/webdevops/php-nginx-dev:8.1-alpine" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.1-alpine" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx-dev_8-1_publish: | |
| name: 'webdevops/php-nginx-dev:8.1 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx-dev_8-1 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx-dev:8.1" \ | |
| -t "ghcr.io/webdevops/php-nginx-dev:8.1" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.1" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.1" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx-dev_8-2: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx-dev:8.2 (${{ matrix.arch }})' | |
| needs: php-nginx_8-2_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4yIiwiRE9DS0VSX1RBRyI6IjguMiIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' | |
| php-nginx-dev_8-2-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx-dev:8.2-alpine (${{ matrix.arch }})' | |
| needs: php-nginx_8-2-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4yLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjItYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' | |
| php-nginx-dev_8-2-alpine_publish: | |
| name: 'webdevops/php-nginx-dev:8.2-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx-dev_8-2-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx-dev:8.2-alpine" \ | |
| -t "ghcr.io/webdevops/php-nginx-dev:8.2-alpine" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.2-alpine" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx-dev_8-2_publish: | |
| name: 'webdevops/php-nginx-dev:8.2 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx-dev_8-2 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx-dev:8.2" \ | |
| -t "ghcr.io/webdevops/php-nginx-dev:8.2" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.2" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.2" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx-dev_8-3: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx-dev:8.3 (${{ matrix.arch }})' | |
| needs: php-nginx_8-3_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4zIiwiRE9DS0VSX1RBRyI6IjguMyIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' | |
| php-nginx-dev_8-3-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx-dev:8.3-alpine (${{ matrix.arch }})' | |
| needs: php-nginx_8-3-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC4zLWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjMtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' | |
| php-nginx-dev_8-3-alpine_publish: | |
| name: 'webdevops/php-nginx-dev:8.3-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx-dev_8-3-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx-dev:8.3-alpine" \ | |
| -t "ghcr.io/webdevops/php-nginx-dev:8.3-alpine" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.3-alpine" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx-dev_8-3_publish: | |
| name: 'webdevops/php-nginx-dev:8.3 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx-dev_8-3 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx-dev:8.3" \ | |
| -t "ghcr.io/webdevops/php-nginx-dev:8.3" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.3" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.3" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx-dev_8-4: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx-dev:8.4 (${{ matrix.arch }})' | |
| needs: php-nginx_8-4_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC40IiwiRE9DS0VSX1RBRyI6IjguNCIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' | |
| php-nginx-dev_8-4-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx-dev:8.4-alpine (${{ matrix.arch }})' | |
| needs: php-nginx_8-4-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC40LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjQtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' | |
| php-nginx-dev_8-4-alpine_publish: | |
| name: 'webdevops/php-nginx-dev:8.4-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx-dev_8-4-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx-dev:8.4-alpine" \ | |
| -t "ghcr.io/webdevops/php-nginx-dev:8.4-alpine" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.4-alpine" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx-dev_8-4_publish: | |
| name: 'webdevops/php-nginx-dev:8.4 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx-dev_8-4 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx-dev:8.4" \ | |
| -t "ghcr.io/webdevops/php-nginx-dev:8.4" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.4" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.4" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx-dev_8-5: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx-dev:8.5 (${{ matrix.arch }})' | |
| needs: php-nginx_8-5_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC41IiwiRE9DS0VSX1RBRyI6IjguNSIsIk9TX0ZBTUlMWSI6ImRlYmlhbiIsIk9TX1ZFUlNJT04iOiIxMiIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' | |
| php-nginx-dev_8-5-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx-dev:8.5-alpine (${{ matrix.arch }})' | |
| needs: php-nginx_8-5-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx-dev_spec.rb webdevops/php-nginx-dev:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueC1kZXY6OC41LWFscGluZSIsIkRPQ0tFUl9UQUciOiI4LjUtYWxwaW5lIiwiT1NfRkFNSUxZIjoiYWxwaW5lIiwiT1NfVkVSU0lPTiI6IjMiLCJQSFBfT0ZGSUNJQUwiOiIxIiwiRE9DS0VSRklMRSI6IkRvY2tlcmZpbGVfdGVzdCJ9 Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' | |
| php-nginx-dev_8-5-alpine_publish: | |
| name: 'webdevops/php-nginx-dev:8.5-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx-dev_8-5-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx-dev:8.5-alpine" \ | |
| -t "ghcr.io/webdevops/php-nginx-dev:8.5-alpine" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.5-alpine" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx-dev_8-5_publish: | |
| name: 'webdevops/php-nginx-dev:8.5 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx-dev_8-5 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx-dev:8.5" \ | |
| -t "ghcr.io/webdevops/php-nginx-dev:8.5" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-amd64-8.5" \ | |
| "ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-arm64-8.5" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx_8-1: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx:8.1 (${{ matrix.arch }})' | |
| needs: php_8-1_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjEiLCJET0NLRVJfVEFHIjoiOC4xIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.1 --config php-nginx/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' | |
| php-nginx_8-1-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx:8.1-alpine (${{ matrix.arch }})' | |
| needs: php_8-1-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-nginx/8.1-alpine | |
| platforms: '${{ matrix.platform }}' | |
| load: true | |
| tags: 'ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine' | |
| cache-from: type=gha | |
| cache-to: 'type=gha,mode=max' | |
| build-args: 'TARGETARCH=${{ matrix.arch }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjEtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMS1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine --config php-nginx/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' | |
| php-nginx_8-1-alpine_publish: | |
| name: 'webdevops/php-nginx:8.1-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx_8-1-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx:8.1-alpine" \ | |
| -t "ghcr.io/webdevops/php-nginx:8.1-alpine" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.1-alpine" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx_8-1_publish: | |
| name: 'webdevops/php-nginx:8.1 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx_8-1 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx:8.1" \ | |
| -t "ghcr.io/webdevops/php-nginx:8.1" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.1" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.1" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx_8-2: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx:8.2 (${{ matrix.arch }})' | |
| needs: php_8-2_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjIiLCJET0NLRVJfVEFHIjoiOC4yIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2 --config php-nginx/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' | |
| php-nginx_8-2-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx:8.2-alpine (${{ matrix.arch }})' | |
| needs: php_8-2-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjItYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMi1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine --config php-nginx/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' | |
| php-nginx_8-2-alpine_publish: | |
| name: 'webdevops/php-nginx:8.2-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx_8-2-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx:8.2-alpine" \ | |
| -t "ghcr.io/webdevops/php-nginx:8.2-alpine" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.2-alpine" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx_8-2_publish: | |
| name: 'webdevops/php-nginx:8.2 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx_8-2 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx:8.2" \ | |
| -t "ghcr.io/webdevops/php-nginx:8.2" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.2" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.2" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx_8-3: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx:8.3 (${{ matrix.arch }})' | |
| needs: php_8-3_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjMiLCJET0NLRVJfVEFHIjoiOC4zIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3 --config php-nginx/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' | |
| php-nginx_8-3-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx:8.3-alpine (${{ matrix.arch }})' | |
| needs: php_8-3-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjMtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMy1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine --config php-nginx/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' | |
| php-nginx_8-3-alpine_publish: | |
| name: 'webdevops/php-nginx:8.3-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx_8-3-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx:8.3-alpine" \ | |
| -t "ghcr.io/webdevops/php-nginx:8.3-alpine" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.3-alpine" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx_8-3_publish: | |
| name: 'webdevops/php-nginx:8.3 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx_8-3 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx:8.3" \ | |
| -t "ghcr.io/webdevops/php-nginx:8.3" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.3" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.3" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx_8-4: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx:8.4 (${{ matrix.arch }})' | |
| needs: php_8-4_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjQiLCJET0NLRVJfVEFHIjoiOC40IiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4 --config php-nginx/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' | |
| php-nginx_8-4-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx:8.4-alpine (${{ matrix.arch }})' | |
| needs: php_8-4-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjQtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguNC1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine --config php-nginx/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' | |
| php-nginx_8-4-alpine_publish: | |
| name: 'webdevops/php-nginx:8.4-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx_8-4-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx:8.4-alpine" \ | |
| -t "ghcr.io/webdevops/php-nginx:8.4-alpine" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.4-alpine" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx_8-4_publish: | |
| name: 'webdevops/php-nginx:8.4 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx_8-4 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx:8.4" \ | |
| -t "ghcr.io/webdevops/php-nginx:8.4" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.4" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.4" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx_8-5: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx:8.5 (${{ matrix.arch }})' | |
| needs: php_8-5_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjUiLCJET0NLRVJfVEFHIjoiOC41IiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5 --config php-nginx/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' | |
| php-nginx_8-5-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php-nginx:8.5-alpine (${{ matrix.arch }})' | |
| needs: php_8-5-alpine_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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 }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php-nginx_spec.rb webdevops/php-nginx:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1uZ2lueDo4LjUtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguNS1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine --config php-nginx/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' | |
| php-nginx_8-5-alpine_publish: | |
| name: 'webdevops/php-nginx:8.5-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx_8-5-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx:8.5-alpine" \ | |
| -t "ghcr.io/webdevops/php-nginx:8.5-alpine" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.5-alpine" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php-nginx_8-5_publish: | |
| name: 'webdevops/php-nginx:8.5 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php-nginx_8-5 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php-nginx:8.5" \ | |
| -t "ghcr.io/webdevops/php-nginx:8.5" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-amd64-8.5" \ | |
| "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-arm64-8.5" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php_8-1: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php:8.1 (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.1 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjEiLCJET0NLRVJfVEFHIjoiOC4xIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.1 --config php/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1' | |
| php_8-1-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php:8.1-alpine (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.1-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjEtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMS1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.1-alpine --config php/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.1-alpine' | |
| php_8-1-alpine_publish: | |
| name: 'webdevops/php:8.1-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php_8-1-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php:8.1-alpine" \ | |
| -t "ghcr.io/webdevops/php:8.1-alpine" \ | |
| -t "webdevops/php-official:8.1-alpine" \ | |
| -t "ghcr.io/webdevops/php-official:8.1-alpine" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.1-alpine" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.1-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php_8-1_publish: | |
| name: 'webdevops/php:8.1 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php_8-1 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php:8.1" \ | |
| -t "ghcr.io/webdevops/php:8.1" \ | |
| -t "webdevops/php-official:8.1" \ | |
| -t "ghcr.io/webdevops/php-official:8.1" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.1" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.1" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php_8-2: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php:8.2 (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.2 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjIiLCJET0NLRVJfVEFHIjoiOC4yIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2 --config php/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' | |
| php_8-2-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php:8.2-alpine (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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 }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.2-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjItYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMi1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine --config php/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' | |
| php_8-2-alpine_publish: | |
| name: 'webdevops/php:8.2-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php_8-2-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php:8.2-alpine" \ | |
| -t "ghcr.io/webdevops/php:8.2-alpine" \ | |
| -t "webdevops/php-official:8.2-alpine" \ | |
| -t "ghcr.io/webdevops/php-official:8.2-alpine" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.2-alpine" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.2-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php_8-2_publish: | |
| name: 'webdevops/php:8.2 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php_8-2 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php:8.2" \ | |
| -t "ghcr.io/webdevops/php:8.2" \ | |
| -t "webdevops/php-official:8.2" \ | |
| -t "ghcr.io/webdevops/php-official:8.2" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.2" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.2" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php_8-3: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php:8.3 (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.3 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjMiLCJET0NLRVJfVEFHIjoiOC4zIiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3 --config php/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' | |
| php_8-3-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php:8.3-alpine (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.3-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjMtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguMy1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine --config php/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' | |
| php_8-3-alpine_publish: | |
| name: 'webdevops/php:8.3-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php_8-3-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php:8.3-alpine" \ | |
| -t "ghcr.io/webdevops/php:8.3-alpine" \ | |
| -t "webdevops/php-official:8.3-alpine" \ | |
| -t "ghcr.io/webdevops/php-official:8.3-alpine" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.3-alpine" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.3-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php_8-3_publish: | |
| name: 'webdevops/php:8.3 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php_8-3 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php:8.3" \ | |
| -t "ghcr.io/webdevops/php:8.3" \ | |
| -t "webdevops/php-official:8.3" \ | |
| -t "ghcr.io/webdevops/php-official:8.3" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.3" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.3" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php_8-4: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php:8.4 (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.4 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjQiLCJET0NLRVJfVEFHIjoiOC40IiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4 --config php/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' | |
| php_8-4-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php:8.4-alpine (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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 }}' | |
| - | |
| name: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.4-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjQtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguNC1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine --config php/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' | |
| php_8-4-alpine_publish: | |
| name: 'webdevops/php:8.4-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php_8-4-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php:8.4-alpine" \ | |
| -t "ghcr.io/webdevops/php:8.4-alpine" \ | |
| -t "webdevops/php-official:8.4-alpine" \ | |
| -t "ghcr.io/webdevops/php-official:8.4-alpine" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.4-alpine" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.4-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php_8-4_publish: | |
| name: 'webdevops/php:8.4 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php_8-4 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php:8.4" \ | |
| -t "ghcr.io/webdevops/php:8.4" \ | |
| -t "webdevops/php-official:8.4" \ | |
| -t "ghcr.io/webdevops/php-official:8.4" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.4" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.4" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php_8-5: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php:8.5 (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5 >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.5 eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjUiLCJET0NLRVJfVEFHIjoiOC41IiwiT1NfRkFNSUxZIjoiZGViaWFuIiwiT1NfVkVSU0lPTiI6IjEyIiwiUEhQX09GRklDSUFMIjoiMSIsIkRPQ0tFUkZJTEUiOiJEb2NrZXJmaWxlX3Rlc3QifQ== Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5 --config php/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' | |
| php_8-5-alpine: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/php:8.5-alpine (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/php-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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/php_spec.rb webdevops/php:8.5-alpine eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3BocC1vZmZpY2lhbDo4LjUtYWxwaW5lIiwiRE9DS0VSX1RBRyI6IjguNS1hbHBpbmUiLCJPU19GQU1JTFkiOiJhbHBpbmUiLCJPU19WRVJTSU9OIjoiMyIsIlBIUF9PRkZJQ0lBTCI6IjEiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| name: 'run structure-test' | |
| run: |- | |
| cd tests/structure-test | |
| /usr/local/bin/container-structure-test test --image ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine --config php/test.yaml | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' | |
| php_8-5-alpine_publish: | |
| name: 'webdevops/php:8.5-alpine - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php_8-5-alpine | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php:8.5-alpine" \ | |
| -t "ghcr.io/webdevops/php:8.5-alpine" \ | |
| -t "webdevops/php-official:8.5-alpine" \ | |
| -t "ghcr.io/webdevops/php-official:8.5-alpine" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.5-alpine" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.5-alpine" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| php_8-5_publish: | |
| name: 'webdevops/php:8.5 - Publish' | |
| runs-on: ubuntu-latest | |
| needs: php_8-5 | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/php:8.5" \ | |
| -t "ghcr.io/webdevops/php:8.5" \ | |
| -t "webdevops/php-official:8.5" \ | |
| -t "ghcr.io/webdevops/php-official:8.5" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-amd64-8.5" \ | |
| "ghcr.io/webdevops/php:sha-${{ github.sha }}-arm64-8.5" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| storage_latest: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/storage:latest (${{ matrix.arch }})' | |
| needs: toolbox_latest_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/storage/latest | |
| platforms: '${{ matrix.platform }}' | |
| load: true | |
| tags: 'ghcr.io/webdevops/storage:sha-${{ github.sha }}-${{ matrix.arch }}-latest' | |
| cache-from: type=gha | |
| cache-to: 'type=gha,mode=max' | |
| build-args: 'TARGETARCH=${{ matrix.arch }}' | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/storage:sha-${{ github.sha }}-${{ matrix.arch }}"-latest' | |
| storage_latest_publish: | |
| name: 'webdevops/storage:latest - Publish' | |
| runs-on: ubuntu-latest | |
| needs: storage_latest | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/storage:latest" \ | |
| -t "ghcr.io/webdevops/storage:latest" \ | |
| "ghcr.io/webdevops/storage:sha-${{ github.sha }}-amd64-latest" \ | |
| "ghcr.io/webdevops/storage:sha-${{ github.sha }}-arm64-latest" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| toolbox_latest: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/toolbox:latest (${{ matrix.arch }})' | |
| needs: validate-automation | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/toolbox/latest | |
| platforms: '${{ matrix.platform }}' | |
| load: true | |
| tags: 'ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' | |
| cache-from: type=gha | |
| cache-to: 'type=gha,mode=max' | |
| build-args: 'TARGETARCH=${{ matrix.arch }}' | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}"-latest' | |
| toolbox_latest_publish: | |
| name: 'webdevops/toolbox:latest - Publish' | |
| runs-on: ubuntu-latest | |
| needs: toolbox_latest | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/toolbox:latest" \ | |
| -t "ghcr.io/webdevops/toolbox:latest" \ | |
| "ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-amd64-latest" \ | |
| "ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-arm64-latest" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 | |
| vsftp_latest: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| platform: linux/amd64 | |
| - | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| platform: linux/arm64 | |
| name: 'webdevops/vsftp:latest (${{ matrix.arch }})' | |
| needs: base_ubuntu-22-04_publish | |
| runs-on: '${{ matrix.runner }}' | |
| container: webdevops/dockerfile-build-env | |
| steps: | |
| - | |
| uses: actions/checkout@v6 | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Build (load locally)' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker/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: 'run serverspec' | |
| run: |- | |
| cd tests/serverspec | |
| echo "FROM ghcr.io/webdevops/vsftp:sha-${{ github.sha }}-${{ matrix.arch }}"-latest >> Dockerfile_test | |
| echo "COPY conf/ /" >> Dockerfile_test | |
| bundle install | |
| bash serverspec.sh spec/docker/vsftp_spec.rb webdevops/vsftp:latest eyJET0NLRVJfSU1BR0UiOiJ3ZWJkZXZvcHNcL3ZzZnRwOmxhdGVzdCIsIkRPQ0tFUl9UQUciOiJsYXRlc3QiLCJPU19GQU1JTFkiOiJ1YnVudHUiLCJPU19WRVJTSU9OIjoiMjIuMDQiLCJET0NLRVJGSUxFIjoiRG9ja2VyZmlsZV90ZXN0In0= Dockerfile_test | |
| - | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Push arch image' | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| run: 'docker push "ghcr.io/webdevops/vsftp:sha-${{ github.sha }}-${{ matrix.arch }}"-latest' | |
| vsftp_latest_publish: | |
| name: 'webdevops/vsftp:latest - Publish' | |
| runs-on: ubuntu-latest | |
| needs: vsftp_latest | |
| if: "${{github.ref == 'refs/heads/master'}}" | |
| steps: | |
| - | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: 'Login to ghcr.io' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: '${{ github.actor }}' | |
| password: '${{ secrets.GITHUB_TOKEN }}' | |
| - | |
| name: 'Login to hub.docker.com' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: '${{ secrets.DOCKERHUB_USERNAME }}' | |
| password: '${{ secrets.DOCKERHUB_TOKEN }}' | |
| - | |
| name: 'Create and push multi-arch manifest' | |
| run: |- | |
| set -euo pipefail | |
| for i in 1 2 3 4 5 6 7 8 9 10; do | |
| docker buildx imagetools create \ | |
| -t "webdevops/vsftp:latest" \ | |
| -t "ghcr.io/webdevops/vsftp:latest" \ | |
| "ghcr.io/webdevops/vsftp:sha-${{ github.sha }}-amd64-latest" \ | |
| "ghcr.io/webdevops/vsftp:sha-${{ github.sha }}-arm64-latest" && exit 0 | |
| sleep $((i*i)) | |
| done | |
| exit 1 |