From 9d98bb198c26e02939ee4f16c70ada6425fefabc Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Sun, 15 Nov 2026 19:40:34 +0000 Subject: [PATCH 1/5] [TASK] Give PIE a GitHub token and pull from Docker Hub through a mirror outside of master Builds failed now and then on rate limits: - PIE resolves and downloads the extensions through the GitHub API. It sent its requests without a token, so they counted against the limit for anonymous requests of the runner's IP address, and PIE failed with "Could not authenticate against github.com" (nightly run #450, pull request #624). - BuildKit pulled the images from Docker Hub anonymously and got "429 Too Many Requests" (master run #452, pull requests #623 and #624). The build steps now pass GITHUB_TOKEN as the build secret COMPOSER_AUTH, which the RUN instructions with PIE mount as an environment variable for Composer, on which PIE builds. Every script of those RUN instructions can read the token, so the workflow restricts it to reading the repository and writing the packages on ghcr.io. Mounting a secret as an environment variable needs BuildKit 0.16. Outside of master, BuildKit pulls the images from Docker Hub through mirror.gcr.io; the webdevops images come from the artifacts of the run there. Master still pulls from Docker Hub directly, because its builds take the parent images that the publish jobs have just pushed. --- .github/workflows/build.yaml | 1028 +++++++++++++++++ CONTRIBUTING.md | 18 +- ci/src/Commands/GenerateGithubCiCommand.php | 6 + ci/src/GithubJobBuilder.php | 56 +- .../Commands/GenerateGithubCiCommandTest.php | 5 + ci/tests/GithubJobBuilderTest.php | 63 +- docker/php-apache-dev/8.2-alpine/Dockerfile | 1 + .../php-apache-dev/8.2-alpine/Dockerfile.twig | 1 + docker/php-apache-dev/8.2/Dockerfile | 1 + docker/php-apache-dev/8.2/Dockerfile.twig | 1 + docker/php-apache-dev/8.3-alpine/Dockerfile | 1 + .../php-apache-dev/8.3-alpine/Dockerfile.twig | 1 + docker/php-apache-dev/8.3/Dockerfile | 1 + docker/php-apache-dev/8.3/Dockerfile.twig | 1 + docker/php-apache-dev/8.4-alpine/Dockerfile | 1 + .../php-apache-dev/8.4-alpine/Dockerfile.twig | 1 + docker/php-apache-dev/8.4/Dockerfile | 1 + docker/php-apache-dev/8.4/Dockerfile.twig | 1 + docker/php-apache-dev/8.5-alpine/Dockerfile | 1 + .../php-apache-dev/8.5-alpine/Dockerfile.twig | 1 + docker/php-apache-dev/8.5/Dockerfile | 1 + docker/php-apache-dev/8.5/Dockerfile.twig | 1 + docker/php-dev/8.2-alpine/Dockerfile | 1 + docker/php-dev/8.2-alpine/Dockerfile.twig | 1 + docker/php-dev/8.2/Dockerfile | 1 + docker/php-dev/8.2/Dockerfile.twig | 1 + docker/php-dev/8.3-alpine/Dockerfile | 1 + docker/php-dev/8.3-alpine/Dockerfile.twig | 1 + docker/php-dev/8.3/Dockerfile | 1 + docker/php-dev/8.3/Dockerfile.twig | 1 + docker/php-dev/8.4-alpine/Dockerfile | 1 + docker/php-dev/8.4-alpine/Dockerfile.twig | 1 + docker/php-dev/8.4/Dockerfile | 1 + docker/php-dev/8.4/Dockerfile.twig | 1 + docker/php-dev/8.5-alpine/Dockerfile | 1 + docker/php-dev/8.5-alpine/Dockerfile.twig | 1 + docker/php-dev/8.5/Dockerfile | 1 + docker/php-dev/8.5/Dockerfile.twig | 1 + docker/php-nginx-dev/8.2-alpine/Dockerfile | 1 + .../php-nginx-dev/8.2-alpine/Dockerfile.twig | 1 + docker/php-nginx-dev/8.2/Dockerfile | 1 + docker/php-nginx-dev/8.2/Dockerfile.twig | 1 + docker/php-nginx-dev/8.3-alpine/Dockerfile | 1 + .../php-nginx-dev/8.3-alpine/Dockerfile.twig | 1 + docker/php-nginx-dev/8.3/Dockerfile | 1 + docker/php-nginx-dev/8.3/Dockerfile.twig | 1 + docker/php-nginx-dev/8.4-alpine/Dockerfile | 1 + .../php-nginx-dev/8.4-alpine/Dockerfile.twig | 1 + docker/php-nginx-dev/8.4/Dockerfile | 1 + docker/php-nginx-dev/8.4/Dockerfile.twig | 1 + docker/php-nginx-dev/8.5-alpine/Dockerfile | 1 + .../php-nginx-dev/8.5-alpine/Dockerfile.twig | 1 + docker/php-nginx-dev/8.5/Dockerfile | 1 + docker/php-nginx-dev/8.5/Dockerfile.twig | 1 + docker/php-official/8.2-alpine/Dockerfile | 1 + .../php-official/8.2-alpine/Dockerfile.twig | 1 + docker/php-official/8.2/Dockerfile | 1 + docker/php-official/8.2/Dockerfile.twig | 1 + docker/php-official/8.3-alpine/Dockerfile | 1 + .../php-official/8.3-alpine/Dockerfile.twig | 1 + docker/php-official/8.3/Dockerfile | 1 + docker/php-official/8.3/Dockerfile.twig | 1 + docker/php-official/8.4-alpine/Dockerfile | 1 + .../php-official/8.4-alpine/Dockerfile.twig | 1 + docker/php-official/8.4/Dockerfile | 1 + docker/php-official/8.4/Dockerfile.twig | 1 + docker/php-official/8.5-alpine/Dockerfile | 1 + .../php-official/8.5-alpine/Dockerfile.twig | 1 + docker/php-official/8.5/Dockerfile | 1 + docker/php-official/8.5/Dockerfile.twig | 1 + 70 files changed, 1233 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 918ab4ecf..000cfd964 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,6 +10,9 @@ name: build branches: - master workflow_dispatch: null +permissions: + contents: read + packages: write jobs: validate-automation: name: 'Validate Automation' @@ -58,7 +61,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Build the image test runner' uses: docker/build-push-action@v7 @@ -96,7 +109,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/base:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -108,6 +131,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/apache/alpine platforms: '${{ matrix.platform }}' @@ -117,10 +142,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/apache:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/apache:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/apache/alpine platforms: '${{ matrix.platform }}' @@ -130,6 +158,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/apache:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/apache:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/base:alpine=oci-layout://.ci-oci-image/base_alpine:ci-parent-image' - name: 'Build the image test runner' @@ -215,7 +244,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/base:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -227,6 +266,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base-app/alpine platforms: '${{ matrix.platform }}' @@ -236,10 +277,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/base-app:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base-app:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base-app/alpine platforms: '${{ matrix.platform }}' @@ -249,6 +293,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/base-app:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base-app:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/base:alpine=oci-layout://.ci-oci-image/base_alpine:ci-parent-image' - name: 'Build the image test runner' @@ -339,7 +384,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/base:ubuntu-22.04' if: "${{ github.ref != 'refs/heads/master' }}" @@ -351,6 +406,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base-app/ubuntu-22.04 platforms: '${{ matrix.platform }}' @@ -360,10 +417,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/base-app:ubuntu-22.04-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base-app:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base-app/ubuntu-22.04 platforms: '${{ matrix.platform }}' @@ -373,6 +433,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/base-app:ubuntu-22.04-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base-app:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/base:ubuntu-22.04=oci-layout://.ci-oci-image/base_ubuntu-22-04:ci-parent-image' - name: 'Build the image test runner' @@ -407,12 +468,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base-app/ubuntu-22.04 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/base-app:ubuntu-22.04-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base-app:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/base:ubuntu-22.04=oci-layout://.ci-oci-image/base_ubuntu-22-04:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/base-app_ubuntu-22-04' - @@ -488,7 +552,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/bootstrap:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -500,6 +574,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base/alpine platforms: '${{ matrix.platform }}' @@ -509,10 +585,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/base:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base/alpine platforms: '${{ matrix.platform }}' @@ -522,6 +601,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/base:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/bootstrap:alpine=oci-layout://.ci-oci-image/bootstrap_alpine:ci-parent-image' - name: 'Build the image test runner' @@ -556,12 +636,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base/alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/base:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/bootstrap:alpine=oci-layout://.ci-oci-image/bootstrap_alpine:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/base_alpine' - @@ -635,7 +718,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/bootstrap:ubuntu-22.04' if: "${{ github.ref != 'refs/heads/master' }}" @@ -647,6 +740,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base/ubuntu-22.04 platforms: '${{ matrix.platform }}' @@ -656,10 +751,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/base:ubuntu-22.04-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base/ubuntu-22.04 platforms: '${{ matrix.platform }}' @@ -669,6 +767,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/base:ubuntu-22.04-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/bootstrap:ubuntu-22.04=oci-layout://.ci-oci-image/bootstrap_ubuntu-22-04:ci-parent-image' - name: 'Build the image test runner' @@ -703,12 +802,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/base/ubuntu-22.04 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/base:ubuntu-22.04-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/base:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/bootstrap:ubuntu-22.04=oci-layout://.ci-oci-image/bootstrap_ubuntu-22-04:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/base_ubuntu-22-04' - @@ -784,7 +886,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -796,6 +908,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/bootstrap/alpine platforms: '${{ matrix.platform }}' @@ -805,10 +919,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/bootstrap:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/bootstrap:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/bootstrap/alpine platforms: '${{ matrix.platform }}' @@ -818,6 +935,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/bootstrap:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/bootstrap:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'Build the image test runner' @@ -852,12 +970,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/bootstrap/alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/bootstrap:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/bootstrap:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/bootstrap_alpine' - @@ -931,7 +1052,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -943,6 +1074,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/bootstrap/ubuntu-22.04 platforms: '${{ matrix.platform }}' @@ -952,10 +1085,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/bootstrap:ubuntu-22.04-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/bootstrap:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/bootstrap/ubuntu-22.04 platforms: '${{ matrix.platform }}' @@ -965,6 +1101,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/bootstrap:ubuntu-22.04-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/bootstrap:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'Build the image test runner' @@ -999,12 +1136,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/bootstrap/ubuntu-22.04 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/bootstrap:ubuntu-22.04-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/bootstrap:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/bootstrap_ubuntu-22-04' - @@ -1080,7 +1220,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/base-app:ubuntu-22.04' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1092,6 +1242,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/dockerfile-build-env/latest platforms: '${{ matrix.platform }}' @@ -1101,10 +1253,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/dockerfile-build-env:latest-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/dockerfile-build-env:latest-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/dockerfile-build-env/latest platforms: '${{ matrix.platform }}' @@ -1114,6 +1269,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/dockerfile-build-env:latest-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/dockerfile-build-env:latest-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/base-app:ubuntu-22.04=oci-layout://.ci-oci-image/base-app_ubuntu-22-04:ci-parent-image' - name: 'Build the image test runner' @@ -1199,7 +1355,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/base:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1211,6 +1377,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/nginx/alpine platforms: '${{ matrix.platform }}' @@ -1220,10 +1388,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/nginx:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/nginx:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/nginx/alpine platforms: '${{ matrix.platform }}' @@ -1233,6 +1404,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/nginx:alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/nginx:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/base:alpine=oci-layout://.ci-oci-image/base_alpine:ci-parent-image' - name: 'Build the image test runner' @@ -1318,7 +1490,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-apache:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1330,6 +1512,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.2 platforms: '${{ matrix.platform }}' @@ -1339,10 +1523,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.2 platforms: '${{ matrix.platform }}' @@ -1352,6 +1539,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-apache:8.2=oci-layout://.ci-oci-image/php-apache_8-2:ci-parent-image' - name: 'Build the image test runner' @@ -1403,7 +1591,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-apache:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1415,6 +1613,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.2-alpine platforms: '${{ matrix.platform }}' @@ -1424,10 +1624,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.2-alpine platforms: '${{ matrix.platform }}' @@ -1437,6 +1640,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-apache:8.2-alpine=oci-layout://.ci-oci-image/php-apache_8-2-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -1556,7 +1760,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-apache:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1568,6 +1782,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.3 platforms: '${{ matrix.platform }}' @@ -1577,10 +1793,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.3 platforms: '${{ matrix.platform }}' @@ -1590,6 +1809,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-apache:8.3=oci-layout://.ci-oci-image/php-apache_8-3:ci-parent-image' - name: 'Build the image test runner' @@ -1641,7 +1861,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-apache:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1653,6 +1883,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.3-alpine platforms: '${{ matrix.platform }}' @@ -1662,10 +1894,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.3-alpine platforms: '${{ matrix.platform }}' @@ -1675,6 +1910,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-apache:8.3-alpine=oci-layout://.ci-oci-image/php-apache_8-3-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -1794,7 +2030,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-apache:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1806,6 +2052,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.4 platforms: '${{ matrix.platform }}' @@ -1815,10 +2063,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.4 platforms: '${{ matrix.platform }}' @@ -1828,6 +2079,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-apache:8.4=oci-layout://.ci-oci-image/php-apache_8-4:ci-parent-image' - name: 'Build the image test runner' @@ -1879,7 +2131,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-apache:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1891,6 +2153,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.4-alpine platforms: '${{ matrix.platform }}' @@ -1900,10 +2164,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.4-alpine platforms: '${{ matrix.platform }}' @@ -1913,6 +2180,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-apache:8.4-alpine=oci-layout://.ci-oci-image/php-apache_8-4-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -2032,7 +2300,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-apache:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2044,6 +2322,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.5 platforms: '${{ matrix.platform }}' @@ -2053,10 +2333,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.5 platforms: '${{ matrix.platform }}' @@ -2066,6 +2349,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-apache:8.5=oci-layout://.ci-oci-image/php-apache_8-5:ci-parent-image' - name: 'Build the image test runner' @@ -2117,7 +2401,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-apache:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2129,6 +2423,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.5-alpine platforms: '${{ matrix.platform }}' @@ -2138,10 +2434,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache-dev/8.5-alpine platforms: '${{ matrix.platform }}' @@ -2151,6 +2450,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache-dev:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-apache:8.5-alpine=oci-layout://.ci-oci-image/php-apache_8-5-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -2270,7 +2570,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2282,6 +2592,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.2 platforms: '${{ matrix.platform }}' @@ -2291,10 +2603,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.2 platforms: '${{ matrix.platform }}' @@ -2304,6 +2619,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.2=oci-layout://.ci-oci-image/php_8-2:ci-parent-image' - name: 'Build the image test runner' @@ -2333,12 +2649,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.2 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-apache:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.2=oci-layout://.ci-oci-image/php_8-2:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-2' - @@ -2378,7 +2697,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2390,6 +2719,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.2-alpine platforms: '${{ matrix.platform }}' @@ -2399,10 +2730,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.2-alpine platforms: '${{ matrix.platform }}' @@ -2412,6 +2746,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.2-alpine=oci-layout://.ci-oci-image/php_8-2-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -2441,12 +2776,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.2-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-apache:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.2-alpine=oci-layout://.ci-oci-image/php_8-2-alpine:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-2-alpine' - @@ -2554,7 +2892,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2566,6 +2914,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.3 platforms: '${{ matrix.platform }}' @@ -2575,10 +2925,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.3 platforms: '${{ matrix.platform }}' @@ -2588,6 +2941,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.3=oci-layout://.ci-oci-image/php_8-3:ci-parent-image' - name: 'Build the image test runner' @@ -2617,12 +2971,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.3 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-apache:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.3=oci-layout://.ci-oci-image/php_8-3:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-3' - @@ -2662,7 +3019,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2674,6 +3041,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.3-alpine platforms: '${{ matrix.platform }}' @@ -2683,10 +3052,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.3-alpine platforms: '${{ matrix.platform }}' @@ -2696,6 +3068,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.3-alpine=oci-layout://.ci-oci-image/php_8-3-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -2725,12 +3098,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.3-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-apache:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.3-alpine=oci-layout://.ci-oci-image/php_8-3-alpine:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-3-alpine' - @@ -2838,7 +3214,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2850,6 +3236,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.4 platforms: '${{ matrix.platform }}' @@ -2859,10 +3247,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.4 platforms: '${{ matrix.platform }}' @@ -2872,6 +3263,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.4=oci-layout://.ci-oci-image/php_8-4:ci-parent-image' - name: 'Build the image test runner' @@ -2901,12 +3293,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.4 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-apache:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.4=oci-layout://.ci-oci-image/php_8-4:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-4' - @@ -2946,7 +3341,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2958,6 +3363,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.4-alpine platforms: '${{ matrix.platform }}' @@ -2967,10 +3374,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.4-alpine platforms: '${{ matrix.platform }}' @@ -2980,6 +3390,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.4-alpine=oci-layout://.ci-oci-image/php_8-4-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -3009,12 +3420,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.4-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-apache:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.4-alpine=oci-layout://.ci-oci-image/php_8-4-alpine:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-4-alpine' - @@ -3122,7 +3536,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3134,6 +3558,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.5 platforms: '${{ matrix.platform }}' @@ -3143,10 +3569,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.5 platforms: '${{ matrix.platform }}' @@ -3156,6 +3585,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.5=oci-layout://.ci-oci-image/php_8-5:ci-parent-image' - name: 'Build the image test runner' @@ -3185,12 +3615,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.5 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-apache:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.5=oci-layout://.ci-oci-image/php_8-5:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-5' - @@ -3230,7 +3663,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3242,6 +3685,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.5-alpine platforms: '${{ matrix.platform }}' @@ -3251,10 +3696,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.5-alpine platforms: '${{ matrix.platform }}' @@ -3264,6 +3712,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-apache:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.5-alpine=oci-layout://.ci-oci-image/php_8-5-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -3293,12 +3742,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-apache/8.5-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-apache:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-apache:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.5-alpine=oci-layout://.ci-oci-image/php_8-5-alpine:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-apache_8-5-alpine' - @@ -3406,7 +3858,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3418,6 +3880,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.2 platforms: '${{ matrix.platform }}' @@ -3427,10 +3891,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.2 platforms: '${{ matrix.platform }}' @@ -3440,6 +3907,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.2=oci-layout://.ci-oci-image/php_8-2:ci-parent-image' - name: 'Build the image test runner' @@ -3496,7 +3964,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3508,6 +3986,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.2-alpine platforms: '${{ matrix.platform }}' @@ -3517,10 +3997,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.2-alpine platforms: '${{ matrix.platform }}' @@ -3530,6 +4013,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.2-alpine=oci-layout://.ci-oci-image/php_8-2-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -3654,7 +4138,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3666,6 +4160,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.3 platforms: '${{ matrix.platform }}' @@ -3675,10 +4171,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.3 platforms: '${{ matrix.platform }}' @@ -3688,6 +4187,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.3=oci-layout://.ci-oci-image/php_8-3:ci-parent-image' - name: 'Build the image test runner' @@ -3744,7 +4244,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3756,6 +4266,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.3-alpine platforms: '${{ matrix.platform }}' @@ -3765,10 +4277,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.3-alpine platforms: '${{ matrix.platform }}' @@ -3778,6 +4293,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.3-alpine=oci-layout://.ci-oci-image/php_8-3-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -3902,7 +4418,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3914,6 +4440,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.4 platforms: '${{ matrix.platform }}' @@ -3923,10 +4451,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.4 platforms: '${{ matrix.platform }}' @@ -3936,6 +4467,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.4=oci-layout://.ci-oci-image/php_8-4:ci-parent-image' - name: 'Build the image test runner' @@ -3992,7 +4524,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4004,6 +4546,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.4-alpine platforms: '${{ matrix.platform }}' @@ -4013,10 +4557,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.4-alpine platforms: '${{ matrix.platform }}' @@ -4026,6 +4573,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.4-alpine=oci-layout://.ci-oci-image/php_8-4-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -4150,7 +4698,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4162,6 +4720,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.5 platforms: '${{ matrix.platform }}' @@ -4171,10 +4731,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.5 platforms: '${{ matrix.platform }}' @@ -4184,6 +4747,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.5=oci-layout://.ci-oci-image/php_8-5:ci-parent-image' - name: 'Build the image test runner' @@ -4240,7 +4804,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4252,6 +4826,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.5-alpine platforms: '${{ matrix.platform }}' @@ -4261,10 +4837,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-dev/8.5-alpine platforms: '${{ matrix.platform }}' @@ -4274,6 +4853,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-dev:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.5-alpine=oci-layout://.ci-oci-image/php_8-5-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -4398,7 +4978,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4410,6 +5000,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.2 platforms: '${{ matrix.platform }}' @@ -4419,10 +5011,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.2 platforms: '${{ matrix.platform }}' @@ -4432,6 +5027,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-nginx:8.2=oci-layout://.ci-oci-image/php-nginx_8-2:ci-parent-image' - name: 'Build the image test runner' @@ -4483,7 +5079,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4495,6 +5101,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.2-alpine platforms: '${{ matrix.platform }}' @@ -4504,10 +5112,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.2-alpine platforms: '${{ matrix.platform }}' @@ -4517,6 +5128,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-nginx:8.2-alpine=oci-layout://.ci-oci-image/php-nginx_8-2-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -4636,7 +5248,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4648,6 +5270,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.3 platforms: '${{ matrix.platform }}' @@ -4657,10 +5281,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.3 platforms: '${{ matrix.platform }}' @@ -4670,6 +5297,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-nginx:8.3=oci-layout://.ci-oci-image/php-nginx_8-3:ci-parent-image' - name: 'Build the image test runner' @@ -4721,7 +5349,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4733,6 +5371,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.3-alpine platforms: '${{ matrix.platform }}' @@ -4742,10 +5382,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.3-alpine platforms: '${{ matrix.platform }}' @@ -4755,6 +5398,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-nginx:8.3-alpine=oci-layout://.ci-oci-image/php-nginx_8-3-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -4874,7 +5518,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4886,6 +5540,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.4 platforms: '${{ matrix.platform }}' @@ -4895,10 +5551,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.4 platforms: '${{ matrix.platform }}' @@ -4908,6 +5567,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-nginx:8.4=oci-layout://.ci-oci-image/php-nginx_8-4:ci-parent-image' - name: 'Build the image test runner' @@ -4959,7 +5619,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4971,6 +5641,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.4-alpine platforms: '${{ matrix.platform }}' @@ -4980,10 +5652,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.4-alpine platforms: '${{ matrix.platform }}' @@ -4993,6 +5668,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-nginx:8.4-alpine=oci-layout://.ci-oci-image/php-nginx_8-4-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -5112,7 +5788,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5124,6 +5810,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.5 platforms: '${{ matrix.platform }}' @@ -5133,10 +5821,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.5 platforms: '${{ matrix.platform }}' @@ -5146,6 +5837,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-nginx:8.5=oci-layout://.ci-oci-image/php-nginx_8-5:ci-parent-image' - name: 'Build the image test runner' @@ -5197,7 +5889,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5209,6 +5911,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.5-alpine platforms: '${{ matrix.platform }}' @@ -5218,10 +5922,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx-dev/8.5-alpine platforms: '${{ matrix.platform }}' @@ -5231,6 +5938,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx-dev:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php-nginx:8.5-alpine=oci-layout://.ci-oci-image/php-nginx_8-5-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -5350,7 +6058,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5362,6 +6080,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.2 platforms: '${{ matrix.platform }}' @@ -5371,10 +6091,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.2 platforms: '${{ matrix.platform }}' @@ -5384,6 +6107,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.2=oci-layout://.ci-oci-image/php_8-2:ci-parent-image' - name: 'Build the image test runner' @@ -5418,12 +6142,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.2 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-nginx:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.2=oci-layout://.ci-oci-image/php_8-2:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-2' - @@ -5463,7 +6190,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5475,6 +6212,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.2-alpine platforms: '${{ matrix.platform }}' @@ -5484,10 +6223,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.2-alpine platforms: '${{ matrix.platform }}' @@ -5497,6 +6239,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.2-alpine=oci-layout://.ci-oci-image/php_8-2-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -5531,12 +6274,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.2-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-nginx:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.2-alpine=oci-layout://.ci-oci-image/php_8-2-alpine:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-2-alpine' - @@ -5644,7 +6390,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5656,6 +6412,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.3 platforms: '${{ matrix.platform }}' @@ -5665,10 +6423,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.3 platforms: '${{ matrix.platform }}' @@ -5678,6 +6439,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.3=oci-layout://.ci-oci-image/php_8-3:ci-parent-image' - name: 'Build the image test runner' @@ -5712,12 +6474,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.3 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-nginx:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.3=oci-layout://.ci-oci-image/php_8-3:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-3' - @@ -5757,7 +6522,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5769,6 +6544,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.3-alpine platforms: '${{ matrix.platform }}' @@ -5778,10 +6555,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.3-alpine platforms: '${{ matrix.platform }}' @@ -5791,6 +6571,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.3-alpine=oci-layout://.ci-oci-image/php_8-3-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -5825,12 +6606,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.3-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-nginx:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.3-alpine=oci-layout://.ci-oci-image/php_8-3-alpine:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-3-alpine' - @@ -5938,7 +6722,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5950,6 +6744,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.4 platforms: '${{ matrix.platform }}' @@ -5959,10 +6755,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.4 platforms: '${{ matrix.platform }}' @@ -5972,6 +6771,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.4=oci-layout://.ci-oci-image/php_8-4:ci-parent-image' - name: 'Build the image test runner' @@ -6006,12 +6806,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.4 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-nginx:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.4=oci-layout://.ci-oci-image/php_8-4:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-4' - @@ -6051,7 +6854,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6063,6 +6876,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.4-alpine platforms: '${{ matrix.platform }}' @@ -6072,10 +6887,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.4-alpine platforms: '${{ matrix.platform }}' @@ -6085,6 +6903,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.4-alpine=oci-layout://.ci-oci-image/php_8-4-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -6119,12 +6938,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.4-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-nginx:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.4-alpine=oci-layout://.ci-oci-image/php_8-4-alpine:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-4-alpine' - @@ -6232,7 +7054,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6244,6 +7076,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.5 platforms: '${{ matrix.platform }}' @@ -6253,10 +7087,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.5 platforms: '${{ matrix.platform }}' @@ -6266,6 +7103,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.5=oci-layout://.ci-oci-image/php_8-5:ci-parent-image' - name: 'Build the image test runner' @@ -6300,12 +7138,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.5 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-nginx:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.5=oci-layout://.ci-oci-image/php_8-5:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-5' - @@ -6345,7 +7186,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6357,6 +7208,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.5-alpine platforms: '${{ matrix.platform }}' @@ -6366,10 +7219,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.5-alpine platforms: '${{ matrix.platform }}' @@ -6379,6 +7235,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php-nginx:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.5-alpine=oci-layout://.ci-oci-image/php_8-5-alpine:ci-parent-image' - name: 'Build the image test runner' @@ -6413,12 +7270,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-nginx/8.5-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php-nginx:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php-nginx:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/php:8.5-alpine=oci-layout://.ci-oci-image/php_8-5-alpine:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php-nginx_8-5-alpine' - @@ -6526,7 +7386,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6538,6 +7408,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.2 platforms: '${{ matrix.platform }}' @@ -6547,10 +7419,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.2 platforms: '${{ matrix.platform }}' @@ -6560,6 +7435,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'Build the image test runner' @@ -6594,12 +7470,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.2 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php:8.2-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-2' - @@ -6639,7 +7518,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6651,6 +7540,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.2-alpine platforms: '${{ matrix.platform }}' @@ -6660,10 +7551,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.2-alpine platforms: '${{ matrix.platform }}' @@ -6673,6 +7567,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'Build the image test runner' @@ -6707,12 +7602,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.2-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php:8.2-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-2-alpine' - @@ -6824,7 +7722,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6836,6 +7744,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.3 platforms: '${{ matrix.platform }}' @@ -6845,10 +7755,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.3 platforms: '${{ matrix.platform }}' @@ -6858,6 +7771,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'Build the image test runner' @@ -6892,12 +7806,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.3 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php:8.3-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-3' - @@ -6937,7 +7854,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6949,6 +7876,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.3-alpine platforms: '${{ matrix.platform }}' @@ -6958,10 +7887,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.3-alpine platforms: '${{ matrix.platform }}' @@ -6971,6 +7903,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'Build the image test runner' @@ -7005,12 +7938,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.3-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php:8.3-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-3-alpine' - @@ -7122,7 +8058,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7134,6 +8080,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.4 platforms: '${{ matrix.platform }}' @@ -7143,10 +8091,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.4 platforms: '${{ matrix.platform }}' @@ -7156,6 +8107,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'Build the image test runner' @@ -7190,12 +8142,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.4 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php:8.4-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-4' - @@ -7235,7 +8190,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7247,6 +8212,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.4-alpine platforms: '${{ matrix.platform }}' @@ -7256,10 +8223,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.4-alpine platforms: '${{ matrix.platform }}' @@ -7269,6 +8239,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'Build the image test runner' @@ -7303,12 +8274,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.4-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php:8.4-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-4-alpine' - @@ -7420,7 +8394,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7432,6 +8416,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.5 platforms: '${{ matrix.platform }}' @@ -7441,10 +8427,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.5 platforms: '${{ matrix.platform }}' @@ -7454,6 +8443,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'Build the image test runner' @@ -7488,12 +8478,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.5 platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php:8.5-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-5' - @@ -7533,7 +8526,17 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7545,6 +8548,8 @@ jobs: name: 'Build (load locally)' if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.5-alpine platforms: '${{ matrix.platform }}' @@ -7554,10 +8559,13 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.5-alpine platforms: '${{ matrix.platform }}' @@ -7567,6 +8575,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/php:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' - name: 'Build the image test runner' @@ -7601,12 +8610,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/php-official/8.5-alpine platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/php:8.5-alpine-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/php:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH build-contexts: 'webdevops/toolbox=oci-layout://.ci-oci-image/toolbox_latest:ci-parent-image' outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/php_8-5-alpine' - @@ -7716,10 +8728,22 @@ jobs: with: persist-credentials: false - + name: 'Set up Buildx' + if: "${{ github.ref == 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 + - + name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' + if: "${{ github.ref != 'refs/heads/master' }}" + uses: docker/setup-buildx-action@v4 + with: + buildkitd-config-inline: |- + [registry."docker.io"] + mirrors = ["mirror.gcr.io"] - name: 'Build (load locally)' uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/toolbox/latest platforms: '${{ matrix.platform }}' @@ -7729,6 +8753,7 @@ jobs: cache-from: 'type=gha,scope=webdevops/toolbox:latest-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/toolbox:latest-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - if: "${{github.ref == 'refs/heads/master'}}" name: 'Login to ghcr.io' @@ -7745,12 +8770,15 @@ jobs: name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/build-push-action@v7 + env: + COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}' with: context: docker/toolbox/latest platforms: '${{ matrix.platform }}' cache-from: 'type=gha,scope=webdevops/toolbox:latest-${{ matrix.arch }}' cache-to: 'type=gha,scope=webdevops/toolbox:latest-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' + secret-envs: COMPOSER_AUTH=COMPOSER_AUTH outputs: 'type=oci,tar=false,name=ci-parent-image,dest=.ci-oci-image/toolbox_latest' - name: 'Upload image (OCI layout)' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bbe48ab92..799c3bb83 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,6 +55,13 @@ GitHub Actions builds every image independently and runs the image tests and str defined for it before pushing it to Docker Hub. The CI also uses `ghcr.io/webdevops/`, but only internally; pull the images from Docker Hub. +The build steps pass the token of the run (`GITHUB_TOKEN`) to Docker as the build secret `COMPOSER_AUTH`, for PIE (see [PHP extension builds](#php-extension-builds)). +The workflow gives this token read access to the repository and write access to the packages on ghcr.io, nothing else. + +Outside of master, in pull requests and on other branches, BuildKit pulls the images from Docker Hub through `mirror.gcr.io`: anonymous pulls from Docker Hub fail with `429 Too Many Requests` once the IP address of the runner has reached its limit. +There, the webdevops images come from the artifacts of the run, so only official images like `php` and `composer` are pulled; an image that the mirror does not have comes from Docker Hub. +On master, the builds pull from Docker Hub directly: they take the parent images that the publish jobs have just pushed, and the mirror could still serve an older one. + ## Building and testing locally Build a single image from its directory. Its parent image (the `FROM` line) and `webdevops/toolbox` are taken from your local images or pulled from Docker Hub: @@ -116,11 +123,20 @@ In the CI, the job `image-test-runner` builds it once per architecture into the ## PHP extension builds -PHP images require Docker BuildKit. The official `ghcr.io/php/pie:bin` image +PHP images require Docker BuildKit 0.16 or later. The official `ghcr.io/php/pie:bin` image supplies PIE through a build-only mount; the existing INI configuration still controls extension loading. PIE requests remain unpinned, and compilation uses `nproc` parallel jobs. +PIE resolves and downloads the extensions through the GitHub API. The `RUN` instructions with PIE mount the build +secret `COMPOSER_AUTH` as an environment variable, which Composer, and with it PIE, reads. Without the secret, PIE +sends its requests without a token, and GitHub limits them per IP address. To build with your token: + +``` +export COMPOSER_AUTH='{"github-oauth":{"github.com":""}}' +docker build --secret id=COMPOSER_AUTH,env=COMPOSER_AUTH -t webdevops/php:8.5 docker/php/8.5 +``` + Protobuf, Vips and XML-RPC are built directly from their official upstream sources. The existing XML-RPC **1.0.0RC3** pin is preserved on all supported PHP versions. Protobuf on PHP 8.2–8.5 uses the latest upstream release. If a future release raises its minimum PHP diff --git a/ci/src/Commands/GenerateGithubCiCommand.php b/ci/src/Commands/GenerateGithubCiCommand.php index d4841f214..36bb54946 100644 --- a/ci/src/Commands/GenerateGithubCiCommand.php +++ b/ci/src/Commands/GenerateGithubCiCommand.php @@ -109,6 +109,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int ], 'workflow_dispatch' => null, ], + // The build steps hand GITHUB_TOKEN to the RUN instructions with PIE, and with them to every script those + // instructions run, so the token may only read the repository and push the images to ghcr.io. + 'permissions' => [ + 'contents' => 'read', + 'packages' => 'write', + ], 'jobs' => $this->jobs, ]; $yamlString = Yaml::dump( diff --git a/ci/src/GithubJobBuilder.php b/ci/src/GithubJobBuilder.php index 7b04f59d5..98a9080e5 100644 --- a/ci/src/GithubJobBuilder.php +++ b/ci/src/GithubJobBuilder.php @@ -26,6 +26,28 @@ class GithubJobBuilder public const string IMAGE_TEST_RUNNER_JOB = 'image-test-runner'; + /** + * PIE resolves and downloads the PHP extensions through the GitHub API. Without a token, its requests count against + * the limit for anonymous requests of the runner's IP address, and PIE fails with "Could not authenticate against + * github.com". The build steps pass the token of the run as the secret COMPOSER_AUTH, which the RUN instructions + * with PIE mount as an environment variable for Composer, on which PIE builds. Pull requests from forks get a + * read-only token too. + */ + private const array COMPOSER_AUTH_ENV = [ + 'COMPOSER_AUTH' => '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}', + ]; + + private const string COMPOSER_AUTH_SECRET = 'COMPOSER_AUTH=COMPOSER_AUTH'; + + /** + * Outside of master, BuildKit pulls Docker Hub images through this mirror: anonymous pulls from Docker Hub fail + * with "429 Too Many Requests" once the runner's IP address has reached its limit. There, the webdevops parent + * images come from the artifacts of the run, so only official images like php and composer are pulled. BuildKit + * falls back to Docker Hub for an image that the mirror does not have. Master pulls the parent images that its + * publish jobs have just pushed, which the mirror could serve outdated, so it pulls from Docker Hub directly. + */ + private const string DOCKER_HUB_MIRROR = 'mirror.gcr.io'; + /** * Every image is built for these platforms. The README banner lists them too. */ @@ -100,18 +122,20 @@ public function getJobsDescription(array $node): array 'uses' => 'actions/checkout@v7', 'with' => ['persist-credentials' => false], ], - ['uses' => 'docker/setup-buildx-action@v4'], + ...$this->setupBuildxSteps(), ...$this->downloadParentImageSteps($imageDependencies), array_filter([ 'name' => 'Build (load locally)', 'if' => $hasImageDependencies ? '${{ github.ref == \'refs/heads/master\' }}' : null, 'uses' => 'docker/build-push-action@v7', + 'env' => self::COMPOSER_AUTH_ENV, 'with' => $this->buildPushWith($node), ], fn (array|string|null $value): bool => $value !== null), $hasImageDependencies ? [ 'name' => 'Build (load locally, from parent artifact)', 'if' => '${{ github.ref != \'refs/heads/master\' }}', 'uses' => 'docker/build-push-action@v7', + 'env' => self::COMPOSER_AUTH_ENV, 'with' => array_merge( $this->buildPushWith($node), ['build-contexts' => $this->buildContexts($imageDependencies)], @@ -155,6 +179,8 @@ public function getJobsDescription(array $node): array 'name' => 'Export image (OCI layout)', 'if' => '${{ github.ref != \'refs/heads/master\' }}', 'uses' => 'docker/build-push-action@v7', + // Only needed if a layer is not in the cache after all. + 'env' => self::COMPOSER_AUTH_ENV, // Reuse the tested local build, including on no-cache reruns. 'with' => array_merge( [ @@ -164,6 +190,7 @@ public function getJobsDescription(array $node): array 'build-args' => implode("\n", [ 'TARGETARCH=${{ matrix.arch }}', ]), + 'secret-envs' => self::COMPOSER_AUTH_SECRET, ], // Must use the exact same build-contexts override as the // tested build above, otherwise this second Buildx invocation @@ -277,6 +304,31 @@ private function buildPushWith(array $node): array 'build-args' => implode("\n", [ 'TARGETARCH=${{ matrix.arch }}', ]), + 'secret-envs' => self::COMPOSER_AUTH_SECRET, + ]; + } + + /** + * Sets up Buildx, outside of master with DOCKER_HUB_MIRROR for the images from Docker Hub. + * + * @return list> + */ + private function setupBuildxSteps(): array + { + return [ + [ + 'name' => 'Set up Buildx', + 'if' => '${{ github.ref == \'refs/heads/master\' }}', + 'uses' => 'docker/setup-buildx-action@v4', + ], + [ + 'name' => 'Set up Buildx (Docker Hub through ' . self::DOCKER_HUB_MIRROR . ')', + 'if' => '${{ github.ref != \'refs/heads/master\' }}', + 'uses' => 'docker/setup-buildx-action@v4', + 'with' => [ + 'buildkitd-config-inline' => "[registry.\"docker.io\"]\n mirrors = [\"" . self::DOCKER_HUB_MIRROR . '"]', + ], + ], ]; } @@ -457,7 +509,7 @@ public function getImageTestRunnerConfig(): array 'uses' => 'actions/checkout@v7', 'with' => ['persist-credentials' => false], ], - ['uses' => 'docker/setup-buildx-action@v4'], + ...$this->setupBuildxSteps(), [ 'name' => 'Build the image test runner', 'uses' => 'docker/build-push-action@v7', diff --git a/ci/tests/Commands/GenerateGithubCiCommandTest.php b/ci/tests/Commands/GenerateGithubCiCommandTest.php index e01c8c20f..3706903b0 100644 --- a/ci/tests/Commands/GenerateGithubCiCommandTest.php +++ b/ci/tests/Commands/GenerateGithubCiCommandTest.php @@ -72,6 +72,11 @@ public function testWritesTheWorkflowWithTheValidationFirstAndTheImageJobsSorted 'pull_request' => ['branches' => ['master']], 'workflow_dispatch' => null, ], $workflow['on']); + self::assertSame( + ['contents' => 'read', 'packages' => 'write'], + $workflow['permissions'], + 'the build steps hand the token to the scripts of the Dockerfiles', + ); self::assertSame(self::ALL_JOBS, array_keys($workflow['jobs'])); self::assertSame('Validate Automation', $workflow['jobs']['validate-automation']['name']); } diff --git a/ci/tests/GithubJobBuilderTest.php b/ci/tests/GithubJobBuilderTest.php index 04cfd1e23..22a66977a 100644 --- a/ci/tests/GithubJobBuilderTest.php +++ b/ci/tests/GithubJobBuilderTest.php @@ -57,9 +57,16 @@ public function testJobWaitsForItsParentAndTheImageTestRunner(): void public function testImageTestRunnerIsBuiltOncePerArchitectureIntoTheCache(): void { $job = new GithubJobBuilder(self::ROOT)->getImageTestRunnerConfig(); + $steps = $this->steps(['job' => $job], 'job'); self::assertSame(['fail-fast' => false, 'matrix' => ['include' => GithubJobBuilder::PLATFORMS]], $job['strategy']); self::assertSame('${{ matrix.runner }}', $job['runs-on']); + self::assertSame([ + 'actions/checkout@v7', + 'Set up Buildx', + 'Set up Buildx (Docker Hub through mirror.gcr.io)', + 'Build the image test runner', + ], array_keys($steps)); self::assertSame([ 'context' => '.', 'file' => 'ci/image-tests/Dockerfile', @@ -67,8 +74,54 @@ public function testImageTestRunnerIsBuiltOncePerArchitectureIntoTheCache(): voi 'outputs' => 'type=cacheonly', 'cache-from' => 'type=gha,scope=webdevops-image-tests-${{ matrix.arch }}', 'cache-to' => 'type=gha,scope=webdevops-image-tests-${{ matrix.arch }},mode=max', - ], $job['steps'][2]['with']); - self::assertTrue($job['steps'][2]['continue-on-error'], 'a failure must not skip the image jobs that need this job'); + ], $steps['Build the image test runner']['with']); + self::assertTrue($steps['Build the image test runner']['continue-on-error'], 'a failure must not skip the image jobs that need this job'); + } + + public function testDockerHubImagesComeThroughTheMirrorOutsideOfMaster(): void + { + $jobSteps = [ + 'image job' => $this->steps($this->jobs()), + 'image test runner' => $this->steps(['job' => new GithubJobBuilder(self::ROOT)->getImageTestRunnerConfig()], 'job'), + ]; + + foreach ($jobSteps as $job => $steps) { + self::assertSame( + [ + 'name' => 'Set up Buildx', + 'if' => '${{ github.ref == \'refs/heads/master\' }}', + 'uses' => 'docker/setup-buildx-action@v4', + ], + $steps['Set up Buildx'], + $job . ': master pulls the parent images that were just published, which the mirror could serve outdated', + ); + self::assertSame( + [ + 'name' => 'Set up Buildx (Docker Hub through mirror.gcr.io)', + 'if' => '${{ github.ref != \'refs/heads/master\' }}', + 'uses' => 'docker/setup-buildx-action@v4', + 'with' => ['buildkitd-config-inline' => "[registry.\"docker.io\"]\n mirrors = [\"mirror.gcr.io\"]"], + ], + $steps['Set up Buildx (Docker Hub through mirror.gcr.io)'], + $job, + ); + } + } + + public function testEveryBuildGetsTheTokenOfTheRunForPie(): void + { + $steps = $this->steps($this->jobs([ + 'imageParent' => 'webdevops/base:ubuntu-22.04', + 'imageParentRef' => 'webdevops/base:latest', + 'hasChildren' => true, + ])); + + foreach (['Build (load locally)', 'Build (load locally, from parent artifact)', 'Export image (OCI layout)'] as $name) { + self::assertSame(['COMPOSER_AUTH' => '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}'], $steps[$name]['env'], $name); + self::assertSame('COMPOSER_AUTH=COMPOSER_AUTH', $steps[$name]['with']['secret-envs'], $name); + } + + self::assertArrayNotHasKey('env', $steps['Build the image test runner'], 'the runner does not use PIE'); } public function testBuildsTheDirectoryOfTheDockerfile(): void @@ -90,7 +143,8 @@ public function testImageWithoutDependenciesIsBuiltOnce(): void self::assertSame([ 'actions/checkout@v7', - 'docker/setup-buildx-action@v4', + 'Set up Buildx', + 'Set up Buildx (Docker Hub through mirror.gcr.io)', 'Build (load locally)', 'Build the image test runner', 'run image tests', @@ -172,7 +226,8 @@ public function testBranchBuildUsesTheParentImagesOfThisRun(): void self::assertSame([ 'actions/checkout@v7', - 'docker/setup-buildx-action@v4', + 'Set up Buildx', + 'Set up Buildx (Docker Hub through mirror.gcr.io)', 'Download parent image (OCI layout): webdevops/base:ubuntu-22.04', 'Download parent image (OCI layout): webdevops/toolbox:latest', 'Build (load locally)', diff --git a/docker/php-apache-dev/8.2-alpine/Dockerfile b/docker/php-apache-dev/8.2-alpine/Dockerfile index 0b4d7f920..a968238e1 100644 --- a/docker/php-apache-dev/8.2-alpine/Dockerfile +++ b/docker/php-apache-dev/8.2-alpine/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-apache-dev/8.2-alpine/Dockerfile.twig b/docker/php-apache-dev/8.2-alpine/Dockerfile.twig index b6eb757fa..a5f763f0d 100644 --- a/docker/php-apache-dev/8.2-alpine/Dockerfile.twig +++ b/docker/php-apache-dev/8.2-alpine/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.2") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-apache-dev/8.2/Dockerfile b/docker/php-apache-dev/8.2/Dockerfile index e5d4863c4..de477ddb1 100644 --- a/docker/php-apache-dev/8.2/Dockerfile +++ b/docker/php-apache-dev/8.2/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-apache-dev/8.2/Dockerfile.twig b/docker/php-apache-dev/8.2/Dockerfile.twig index 94e219fe7..3a933868f 100644 --- a/docker/php-apache-dev/8.2/Dockerfile.twig +++ b/docker/php-apache-dev/8.2/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.2") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-apache-dev/8.3-alpine/Dockerfile b/docker/php-apache-dev/8.3-alpine/Dockerfile index b0d08e297..1e11a2283 100644 --- a/docker/php-apache-dev/8.3-alpine/Dockerfile +++ b/docker/php-apache-dev/8.3-alpine/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-apache-dev/8.3-alpine/Dockerfile.twig b/docker/php-apache-dev/8.3-alpine/Dockerfile.twig index 689a6ebb9..d7c22b5ce 100644 --- a/docker/php-apache-dev/8.3-alpine/Dockerfile.twig +++ b/docker/php-apache-dev/8.3-alpine/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.3") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-apache-dev/8.3/Dockerfile b/docker/php-apache-dev/8.3/Dockerfile index cc2c2d2a6..5ffc3f9c7 100644 --- a/docker/php-apache-dev/8.3/Dockerfile +++ b/docker/php-apache-dev/8.3/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-apache-dev/8.3/Dockerfile.twig b/docker/php-apache-dev/8.3/Dockerfile.twig index a53ee945c..51acab053 100644 --- a/docker/php-apache-dev/8.3/Dockerfile.twig +++ b/docker/php-apache-dev/8.3/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.3") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-apache-dev/8.4-alpine/Dockerfile b/docker/php-apache-dev/8.4-alpine/Dockerfile index 14bc342cb..1e29d92c5 100644 --- a/docker/php-apache-dev/8.4-alpine/Dockerfile +++ b/docker/php-apache-dev/8.4-alpine/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-apache-dev/8.4-alpine/Dockerfile.twig b/docker/php-apache-dev/8.4-alpine/Dockerfile.twig index e2ce6f8ff..88712b0d4 100644 --- a/docker/php-apache-dev/8.4-alpine/Dockerfile.twig +++ b/docker/php-apache-dev/8.4-alpine/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.4") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-apache-dev/8.4/Dockerfile b/docker/php-apache-dev/8.4/Dockerfile index 8a83dac05..216675d5a 100644 --- a/docker/php-apache-dev/8.4/Dockerfile +++ b/docker/php-apache-dev/8.4/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-apache-dev/8.4/Dockerfile.twig b/docker/php-apache-dev/8.4/Dockerfile.twig index ba0e8c0be..7d102ddfd 100644 --- a/docker/php-apache-dev/8.4/Dockerfile.twig +++ b/docker/php-apache-dev/8.4/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.4") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-apache-dev/8.5-alpine/Dockerfile b/docker/php-apache-dev/8.5-alpine/Dockerfile index ec27083ef..023466f25 100644 --- a/docker/php-apache-dev/8.5-alpine/Dockerfile +++ b/docker/php-apache-dev/8.5-alpine/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-apache-dev/8.5-alpine/Dockerfile.twig b/docker/php-apache-dev/8.5-alpine/Dockerfile.twig index 9d6c7c4ff..6c054e38d 100644 --- a/docker/php-apache-dev/8.5-alpine/Dockerfile.twig +++ b/docker/php-apache-dev/8.5-alpine/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.5") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-apache-dev/8.5/Dockerfile b/docker/php-apache-dev/8.5/Dockerfile index c55eab490..7ace046c1 100644 --- a/docker/php-apache-dev/8.5/Dockerfile +++ b/docker/php-apache-dev/8.5/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-apache-dev/8.5/Dockerfile.twig b/docker/php-apache-dev/8.5/Dockerfile.twig index bbff0ae04..88634a6b6 100644 --- a/docker/php-apache-dev/8.5/Dockerfile.twig +++ b/docker/php-apache-dev/8.5/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.5") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-dev/8.2-alpine/Dockerfile b/docker/php-dev/8.2-alpine/Dockerfile index 939a37646..7a846734f 100644 --- a/docker/php-dev/8.2-alpine/Dockerfile +++ b/docker/php-dev/8.2-alpine/Dockerfile @@ -8,6 +8,7 @@ FROM webdevops/php:8.2-alpine COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-dev/8.2-alpine/Dockerfile.twig b/docker/php-dev/8.2-alpine/Dockerfile.twig index 100f44415..28706bd99 100644 --- a/docker/php-dev/8.2-alpine/Dockerfile.twig +++ b/docker/php-dev/8.2-alpine/Dockerfile.twig @@ -6,6 +6,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.2") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-dev/8.2/Dockerfile b/docker/php-dev/8.2/Dockerfile index d06537982..603311cf4 100644 --- a/docker/php-dev/8.2/Dockerfile +++ b/docker/php-dev/8.2/Dockerfile @@ -8,6 +8,7 @@ FROM webdevops/php:8.2 COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-dev/8.2/Dockerfile.twig b/docker/php-dev/8.2/Dockerfile.twig index 531ba4ee6..e0a8a7d12 100644 --- a/docker/php-dev/8.2/Dockerfile.twig +++ b/docker/php-dev/8.2/Dockerfile.twig @@ -6,6 +6,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.2") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-dev/8.3-alpine/Dockerfile b/docker/php-dev/8.3-alpine/Dockerfile index 539b37d73..0914dfa73 100644 --- a/docker/php-dev/8.3-alpine/Dockerfile +++ b/docker/php-dev/8.3-alpine/Dockerfile @@ -8,6 +8,7 @@ FROM webdevops/php:8.3-alpine COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-dev/8.3-alpine/Dockerfile.twig b/docker/php-dev/8.3-alpine/Dockerfile.twig index af76fa649..166c174c8 100644 --- a/docker/php-dev/8.3-alpine/Dockerfile.twig +++ b/docker/php-dev/8.3-alpine/Dockerfile.twig @@ -6,6 +6,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.3") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-dev/8.3/Dockerfile b/docker/php-dev/8.3/Dockerfile index 19408ba53..4cef7e92c 100644 --- a/docker/php-dev/8.3/Dockerfile +++ b/docker/php-dev/8.3/Dockerfile @@ -8,6 +8,7 @@ FROM webdevops/php:8.3 COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-dev/8.3/Dockerfile.twig b/docker/php-dev/8.3/Dockerfile.twig index 99aecaeea..865236ada 100644 --- a/docker/php-dev/8.3/Dockerfile.twig +++ b/docker/php-dev/8.3/Dockerfile.twig @@ -6,6 +6,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.3") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-dev/8.4-alpine/Dockerfile b/docker/php-dev/8.4-alpine/Dockerfile index dac2eb691..659369248 100644 --- a/docker/php-dev/8.4-alpine/Dockerfile +++ b/docker/php-dev/8.4-alpine/Dockerfile @@ -8,6 +8,7 @@ FROM webdevops/php:8.4-alpine COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-dev/8.4-alpine/Dockerfile.twig b/docker/php-dev/8.4-alpine/Dockerfile.twig index 6458f6927..82906f8e3 100644 --- a/docker/php-dev/8.4-alpine/Dockerfile.twig +++ b/docker/php-dev/8.4-alpine/Dockerfile.twig @@ -6,6 +6,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.4") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-dev/8.4/Dockerfile b/docker/php-dev/8.4/Dockerfile index f782ceb0b..71e582e07 100644 --- a/docker/php-dev/8.4/Dockerfile +++ b/docker/php-dev/8.4/Dockerfile @@ -8,6 +8,7 @@ FROM webdevops/php:8.4 COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-dev/8.4/Dockerfile.twig b/docker/php-dev/8.4/Dockerfile.twig index 844ed7b1a..dd3d3709c 100644 --- a/docker/php-dev/8.4/Dockerfile.twig +++ b/docker/php-dev/8.4/Dockerfile.twig @@ -6,6 +6,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.4") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-dev/8.5-alpine/Dockerfile b/docker/php-dev/8.5-alpine/Dockerfile index 4a1b40709..a92ffe33b 100644 --- a/docker/php-dev/8.5-alpine/Dockerfile +++ b/docker/php-dev/8.5-alpine/Dockerfile @@ -8,6 +8,7 @@ FROM webdevops/php:8.5-alpine COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-dev/8.5-alpine/Dockerfile.twig b/docker/php-dev/8.5-alpine/Dockerfile.twig index 3fb284e3a..829697bf5 100644 --- a/docker/php-dev/8.5-alpine/Dockerfile.twig +++ b/docker/php-dev/8.5-alpine/Dockerfile.twig @@ -6,6 +6,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.5") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-dev/8.5/Dockerfile b/docker/php-dev/8.5/Dockerfile index 9a130f462..3e25dae26 100644 --- a/docker/php-dev/8.5/Dockerfile +++ b/docker/php-dev/8.5/Dockerfile @@ -8,6 +8,7 @@ FROM webdevops/php:8.5 COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-dev/8.5/Dockerfile.twig b/docker/php-dev/8.5/Dockerfile.twig index 5fa26cad5..5f91e6a67 100644 --- a/docker/php-dev/8.5/Dockerfile.twig +++ b/docker/php-dev/8.5/Dockerfile.twig @@ -6,6 +6,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.5") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-nginx-dev/8.2-alpine/Dockerfile b/docker/php-nginx-dev/8.2-alpine/Dockerfile index e273d22b9..07bba271c 100644 --- a/docker/php-nginx-dev/8.2-alpine/Dockerfile +++ b/docker/php-nginx-dev/8.2-alpine/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-nginx-dev/8.2-alpine/Dockerfile.twig b/docker/php-nginx-dev/8.2-alpine/Dockerfile.twig index 3088d24e3..53d3a74a9 100644 --- a/docker/php-nginx-dev/8.2-alpine/Dockerfile.twig +++ b/docker/php-nginx-dev/8.2-alpine/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.2") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-nginx-dev/8.2/Dockerfile b/docker/php-nginx-dev/8.2/Dockerfile index c660498e5..3dfefc597 100644 --- a/docker/php-nginx-dev/8.2/Dockerfile +++ b/docker/php-nginx-dev/8.2/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-nginx-dev/8.2/Dockerfile.twig b/docker/php-nginx-dev/8.2/Dockerfile.twig index 585646bc1..7787e5cbe 100644 --- a/docker/php-nginx-dev/8.2/Dockerfile.twig +++ b/docker/php-nginx-dev/8.2/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.2") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-nginx-dev/8.3-alpine/Dockerfile b/docker/php-nginx-dev/8.3-alpine/Dockerfile index 2f5d8488e..039869d98 100644 --- a/docker/php-nginx-dev/8.3-alpine/Dockerfile +++ b/docker/php-nginx-dev/8.3-alpine/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-nginx-dev/8.3-alpine/Dockerfile.twig b/docker/php-nginx-dev/8.3-alpine/Dockerfile.twig index d4ef447bb..c1c4b2a9e 100644 --- a/docker/php-nginx-dev/8.3-alpine/Dockerfile.twig +++ b/docker/php-nginx-dev/8.3-alpine/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.3") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-nginx-dev/8.3/Dockerfile b/docker/php-nginx-dev/8.3/Dockerfile index 4bf5bd2c2..b91d43f95 100644 --- a/docker/php-nginx-dev/8.3/Dockerfile +++ b/docker/php-nginx-dev/8.3/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-nginx-dev/8.3/Dockerfile.twig b/docker/php-nginx-dev/8.3/Dockerfile.twig index 05b8366b9..b3cae51d5 100644 --- a/docker/php-nginx-dev/8.3/Dockerfile.twig +++ b/docker/php-nginx-dev/8.3/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.3") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-nginx-dev/8.4-alpine/Dockerfile b/docker/php-nginx-dev/8.4-alpine/Dockerfile index a405bff87..4923c7b0e 100644 --- a/docker/php-nginx-dev/8.4-alpine/Dockerfile +++ b/docker/php-nginx-dev/8.4-alpine/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-nginx-dev/8.4-alpine/Dockerfile.twig b/docker/php-nginx-dev/8.4-alpine/Dockerfile.twig index 03f00f048..dda131722 100644 --- a/docker/php-nginx-dev/8.4-alpine/Dockerfile.twig +++ b/docker/php-nginx-dev/8.4-alpine/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.4") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-nginx-dev/8.4/Dockerfile b/docker/php-nginx-dev/8.4/Dockerfile index 97a5ac67a..4d9af5008 100644 --- a/docker/php-nginx-dev/8.4/Dockerfile +++ b/docker/php-nginx-dev/8.4/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-nginx-dev/8.4/Dockerfile.twig b/docker/php-nginx-dev/8.4/Dockerfile.twig index 9cedabbe7..9d115ded1 100644 --- a/docker/php-nginx-dev/8.4/Dockerfile.twig +++ b/docker/php-nginx-dev/8.4/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.4") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-nginx-dev/8.5-alpine/Dockerfile b/docker/php-nginx-dev/8.5-alpine/Dockerfile index ef7f7b0b6..a0c7c2b63 100644 --- a/docker/php-nginx-dev/8.5-alpine/Dockerfile +++ b/docker/php-nginx-dev/8.5-alpine/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-nginx-dev/8.5-alpine/Dockerfile.twig b/docker/php-nginx-dev/8.5-alpine/Dockerfile.twig index b1d027639..74d608fe7 100644 --- a/docker/php-nginx-dev/8.5-alpine/Dockerfile.twig +++ b/docker/php-nginx-dev/8.5-alpine/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopmentAlpine(version="8.5") }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-nginx-dev/8.5/Dockerfile b/docker/php-nginx-dev/8.5/Dockerfile index 58732f757..32947ff5e 100644 --- a/docker/php-nginx-dev/8.5/Dockerfile +++ b/docker/php-nginx-dev/8.5/Dockerfile @@ -16,6 +16,7 @@ ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$" COPY conf/ /opt/docker/ RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install development environment && BLACKFIRE_INSTALL_METHOD=raw bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \ diff --git a/docker/php-nginx-dev/8.5/Dockerfile.twig b/docker/php-nginx-dev/8.5/Dockerfile.twig index c8cdb75c8..98fca8fe2 100644 --- a/docker/php-nginx-dev/8.5/Dockerfile.twig +++ b/docker/php-nginx-dev/8.5/Dockerfile.twig @@ -11,6 +11,7 @@ {{ docker.copy('conf/', '/opt/docker/') }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialDevelopment(version="8.5") }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-official/8.2-alpine/Dockerfile b/docker/php-official/8.2-alpine/Dockerfile index 72a4bf0ee..7041dee5a 100644 --- a/docker/php-official/8.2-alpine/Dockerfile +++ b/docker/php-official/8.2-alpine/Dockerfile @@ -81,6 +81,7 @@ RUN set -x \ && docker-run-bootstrap RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install php environment && apk-install \ diff --git a/docker/php-official/8.2-alpine/Dockerfile.twig b/docker/php-official/8.2-alpine/Dockerfile.twig index 4ce2df54f..9a750b790 100644 --- a/docker/php-official/8.2-alpine/Dockerfile.twig +++ b/docker/php-official/8.2-alpine/Dockerfile.twig @@ -35,6 +35,7 @@ RUN set -x \ {{ provision.runBootstrap() }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialAlpine(version='8.2') }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-official/8.2/Dockerfile b/docker/php-official/8.2/Dockerfile index 45cfcf6e6..519ff80ba 100644 --- a/docker/php-official/8.2/Dockerfile +++ b/docker/php-official/8.2/Dockerfile @@ -82,6 +82,7 @@ RUN set -x \ && docker-image-cleanup RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install php environment && apt-install \ diff --git a/docker/php-official/8.2/Dockerfile.twig b/docker/php-official/8.2/Dockerfile.twig index ff10dc522..485e49c6c 100644 --- a/docker/php-official/8.2/Dockerfile.twig +++ b/docker/php-official/8.2/Dockerfile.twig @@ -35,6 +35,7 @@ RUN set -x \ {{ docker.cleanup() }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.official(version='8.2') }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-official/8.3-alpine/Dockerfile b/docker/php-official/8.3-alpine/Dockerfile index e989c59c6..dd122dc8c 100644 --- a/docker/php-official/8.3-alpine/Dockerfile +++ b/docker/php-official/8.3-alpine/Dockerfile @@ -81,6 +81,7 @@ RUN set -x \ && docker-run-bootstrap RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install php environment && apk-install \ diff --git a/docker/php-official/8.3-alpine/Dockerfile.twig b/docker/php-official/8.3-alpine/Dockerfile.twig index 4ed95eb4d..0f0d51639 100644 --- a/docker/php-official/8.3-alpine/Dockerfile.twig +++ b/docker/php-official/8.3-alpine/Dockerfile.twig @@ -35,6 +35,7 @@ RUN set -x \ {{ provision.runBootstrap() }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialAlpine(version='8.3') }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-official/8.3/Dockerfile b/docker/php-official/8.3/Dockerfile index 8fd73de47..3bb6508e8 100644 --- a/docker/php-official/8.3/Dockerfile +++ b/docker/php-official/8.3/Dockerfile @@ -82,6 +82,7 @@ RUN set -x \ && docker-image-cleanup RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install php environment && apt-install \ diff --git a/docker/php-official/8.3/Dockerfile.twig b/docker/php-official/8.3/Dockerfile.twig index 5a0d17df8..67282788f 100644 --- a/docker/php-official/8.3/Dockerfile.twig +++ b/docker/php-official/8.3/Dockerfile.twig @@ -35,6 +35,7 @@ RUN set -x \ {{ docker.cleanup() }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.official(version='8.3') }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-official/8.4-alpine/Dockerfile b/docker/php-official/8.4-alpine/Dockerfile index 6ec47d926..e6bb624e3 100644 --- a/docker/php-official/8.4-alpine/Dockerfile +++ b/docker/php-official/8.4-alpine/Dockerfile @@ -81,6 +81,7 @@ RUN set -x \ && docker-run-bootstrap RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install php environment && apk-install \ diff --git a/docker/php-official/8.4-alpine/Dockerfile.twig b/docker/php-official/8.4-alpine/Dockerfile.twig index 439e31c5b..16fc37ac9 100644 --- a/docker/php-official/8.4-alpine/Dockerfile.twig +++ b/docker/php-official/8.4-alpine/Dockerfile.twig @@ -35,6 +35,7 @@ RUN set -x \ {{ provision.runBootstrap() }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialAlpine(version='8.4') }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-official/8.4/Dockerfile b/docker/php-official/8.4/Dockerfile index 8692fccb5..3730fa07b 100644 --- a/docker/php-official/8.4/Dockerfile +++ b/docker/php-official/8.4/Dockerfile @@ -82,6 +82,7 @@ RUN set -x \ && docker-image-cleanup RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install php environment && apt-install \ diff --git a/docker/php-official/8.4/Dockerfile.twig b/docker/php-official/8.4/Dockerfile.twig index 2ac7a5059..b1eb25fc4 100644 --- a/docker/php-official/8.4/Dockerfile.twig +++ b/docker/php-official/8.4/Dockerfile.twig @@ -35,6 +35,7 @@ RUN set -x \ {{ docker.cleanup() }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.official(version='8.4') }} \ {{ provision.runBootstrap() }} \ diff --git a/docker/php-official/8.5-alpine/Dockerfile b/docker/php-official/8.5-alpine/Dockerfile index 42b25e8e2..59316df79 100644 --- a/docker/php-official/8.5-alpine/Dockerfile +++ b/docker/php-official/8.5-alpine/Dockerfile @@ -81,6 +81,7 @@ RUN set -x \ && docker-run-bootstrap RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install php environment && apk-install \ diff --git a/docker/php-official/8.5-alpine/Dockerfile.twig b/docker/php-official/8.5-alpine/Dockerfile.twig index e60f1eb4d..0fc733392 100644 --- a/docker/php-official/8.5-alpine/Dockerfile.twig +++ b/docker/php-official/8.5-alpine/Dockerfile.twig @@ -35,6 +35,7 @@ RUN set -x \ {{ provision.runBootstrap() }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.officialAlpine(version='8.5') }} \ {{ provision.runBootstrap() }} diff --git a/docker/php-official/8.5/Dockerfile b/docker/php-official/8.5/Dockerfile index b179fd38d..034cbe200 100644 --- a/docker/php-official/8.5/Dockerfile +++ b/docker/php-official/8.5/Dockerfile @@ -82,6 +82,7 @@ RUN set -x \ && docker-image-cleanup RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ # Install php environment && apt-install \ diff --git a/docker/php-official/8.5/Dockerfile.twig b/docker/php-official/8.5/Dockerfile.twig index 32c9cc74f..4951b72a1 100644 --- a/docker/php-official/8.5/Dockerfile.twig +++ b/docker/php-official/8.5/Dockerfile.twig @@ -35,6 +35,7 @@ RUN set -x \ {{ docker.cleanup() }} RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \ + --mount=type=secret,id=COMPOSER_AUTH,env=COMPOSER_AUTH \ set -x \ {{ php.official(version='8.5') }} \ {{ provision.runBootstrap() }} \ From b526ac26067fc98409dcdad642a31d79ab584d6e Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Sun, 15 Nov 2026 19:55:51 +0000 Subject: [PATCH 2/5] [TASK] Take the parent images from ghcr.io on master and use the mirror there too On master, the builds took their webdevops parent images from Docker Hub, right after the publish jobs had pushed them. That is why they did not go through mirror.gcr.io: the mirror could serve an outdated parent image. They now take the image that the job of the parent pushed to ghcr.io in the same run, through build-contexts, like the other runs take it from the artifacts, and the login to ghcr.io comes before the build. No build pulls a webdevops image from Docker Hub any more, so every run pulls the images from Docker Hub through the mirror. --- .github/workflows/build.yaml | 1280 ++++++++++++----------------- CONTRIBUTING.md | 7 +- ci/src/GithubJobBuilder.php | 93 ++- ci/tests/GithubJobBuilderTest.php | 44 +- 4 files changed, 609 insertions(+), 815 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 000cfd964..4dc2f7cc5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -60,13 +60,8 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- @@ -108,18 +103,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/base:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -143,6 +141,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/apache:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/base:alpine=docker-image://ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -172,14 +171,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/apache:alpine REFERENCE=ghcr.io/webdevops/apache:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -243,18 +234,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/base:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -278,6 +272,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/base-app:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/base:alpine=docker-image://ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -312,14 +307,6 @@ jobs: 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 - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -383,18 +370,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/base:ubuntu-22.04' if: "${{ github.ref != 'refs/heads/master' }}" @@ -418,6 +408,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/base-app:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/base:ubuntu-22.04=docker-image://ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -452,14 +443,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -551,18 +534,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/bootstrap:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -586,6 +572,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/base:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/bootstrap:alpine=docker-image://ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -620,14 +607,6 @@ jobs: 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 - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -717,18 +696,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/bootstrap:ubuntu-22.04' if: "${{ github.ref != 'refs/heads/master' }}" @@ -752,6 +734,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/base:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/bootstrap:ubuntu-22.04=docker-image://ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -786,14 +769,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -885,18 +860,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -920,6 +898,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/bootstrap:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -954,14 +933,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1051,18 +1022,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1086,6 +1060,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/bootstrap:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1120,14 +1095,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1219,18 +1186,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/base-app:ubuntu-22.04' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1254,6 +1224,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/dockerfile-build-env:latest-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/base-app:ubuntu-22.04=docker-image://ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1283,14 +1254,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/dockerfile-build-env:latest REFERENCE=ghcr.io/webdevops/dockerfile-build-env:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1354,18 +1317,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/base:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1389,6 +1355,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/nginx:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/base:alpine=docker-image://ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1418,14 +1385,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/nginx:alpine REFERENCE=ghcr.io/webdevops/nginx:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1489,18 +1448,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1524,6 +1486,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-apache:8.2=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1553,14 +1516,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.2 REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1590,18 +1545,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1625,6 +1583,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-apache:8.2-alpine=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1654,14 +1613,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.2-alpine REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1759,18 +1710,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1794,6 +1748,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-apache:8.3=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1823,14 +1778,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.3 REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1860,18 +1807,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1895,6 +1845,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-apache:8.3-alpine=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1924,14 +1875,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.3-alpine REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2029,18 +1972,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2064,6 +2010,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-apache:8.4=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2093,14 +2040,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.4 REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2130,18 +2069,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2165,6 +2107,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-apache:8.4-alpine=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2194,14 +2137,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.4-alpine REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2299,18 +2234,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2334,6 +2272,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-apache:8.5=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2363,14 +2302,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.5 REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2400,18 +2331,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2435,6 +2369,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-apache:8.5-alpine=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2464,14 +2399,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.5-alpine REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2569,18 +2496,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2604,6 +2534,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.2=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2633,14 +2564,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.2 REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2696,18 +2619,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2731,6 +2657,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.2-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2760,14 +2687,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.2-alpine REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2891,18 +2810,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2926,6 +2848,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.3=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2955,14 +2878,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.3 REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3018,18 +2933,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3053,6 +2971,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.3-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3082,14 +3001,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.3-alpine REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3213,18 +3124,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3248,6 +3162,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.4=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3277,14 +3192,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.4 REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3340,18 +3247,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3375,6 +3285,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.4-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3404,14 +3315,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.4-alpine REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3535,18 +3438,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3570,6 +3476,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.5=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3599,14 +3506,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.5 REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3662,18 +3561,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3697,6 +3599,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.5-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3726,14 +3629,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.5-alpine REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3857,18 +3752,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3892,6 +3790,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.2=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3926,14 +3825,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3963,18 +3854,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3998,6 +3892,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.2-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4032,14 +3927,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4137,18 +4024,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4172,6 +4062,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.3=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4206,14 +4097,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4243,18 +4126,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4278,6 +4164,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.3-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4312,14 +4199,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4417,18 +4296,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4452,6 +4334,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.4=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4486,14 +4369,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4523,18 +4398,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4558,6 +4436,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.4-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4592,14 +4471,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4697,18 +4568,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4732,6 +4606,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.5=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4766,14 +4641,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4803,18 +4670,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4838,6 +4708,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.5-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4872,14 +4743,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4977,18 +4840,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5012,6 +4878,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-nginx:8.2=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5041,14 +4908,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.2 REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5078,18 +4937,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5113,6 +4975,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-nginx:8.2-alpine=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5142,14 +5005,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.2-alpine REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5247,18 +5102,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5282,6 +5140,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-nginx:8.3=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5311,14 +5170,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.3 REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5348,18 +5199,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5383,6 +5237,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-nginx:8.3-alpine=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5412,14 +5267,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.3-alpine REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5517,18 +5364,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5552,6 +5402,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-nginx:8.4=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5581,14 +5432,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.4 REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5618,18 +5461,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5653,6 +5499,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-nginx:8.4-alpine=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5682,14 +5529,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.4-alpine REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5787,18 +5626,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5822,6 +5664,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-nginx:8.5=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5851,14 +5694,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.5 REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5888,18 +5723,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5923,6 +5761,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php-nginx:8.5-alpine=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5952,14 +5791,6 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.5-alpine REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6057,18 +5888,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6092,6 +5926,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.2=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6126,14 +5961,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6189,18 +6016,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6224,6 +6054,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.2-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6258,14 +6089,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6389,18 +6212,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6424,6 +6250,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.3=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6458,14 +6285,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6521,18 +6340,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6556,6 +6378,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.3-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6590,14 +6413,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6721,18 +6536,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6756,6 +6574,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.4=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6790,14 +6609,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6853,18 +6664,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6888,6 +6702,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.4-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6922,14 +6737,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7053,18 +6860,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7088,6 +6898,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.5=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7122,14 +6933,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7185,18 +6988,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7220,6 +7026,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/php:8.5-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7254,14 +7061,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7385,18 +7184,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7420,6 +7222,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7454,14 +7257,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7517,18 +7312,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7552,6 +7350,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7586,14 +7385,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7721,18 +7512,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7756,6 +7550,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7790,14 +7585,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7853,18 +7640,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7888,6 +7678,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7922,14 +7713,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -8057,18 +7840,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8092,6 +7878,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8126,14 +7913,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -8189,18 +7968,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8224,6 +8006,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8258,14 +8041,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -8393,18 +8168,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8428,6 +8206,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8462,14 +8241,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -8525,18 +8296,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8560,6 +8334,7 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8594,14 +8369,6 @@ jobs: 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@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -8727,18 +8494,21 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - - name: 'Set up Buildx' - if: "${{ github.ref == 'refs/heads/master' }}" - uses: docker/setup-buildx-action@v4 - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' - if: "${{ github.ref != 'refs/heads/master' }}" uses: docker/setup-buildx-action@v4 with: buildkitd-config-inline: |- [registry."docker.io"] mirrors = ["mirror.gcr.io"] + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Build (load locally)' uses: docker/build-push-action@v7 @@ -8754,14 +8524,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/toolbox:latest-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 799c3bb83..bfec2ee6f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,9 +58,10 @@ internally; pull the images from Docker Hub. The build steps pass the token of the run (`GITHUB_TOKEN`) to Docker as the build secret `COMPOSER_AUTH`, for PIE (see [PHP extension builds](#php-extension-builds)). The workflow gives this token read access to the repository and write access to the packages on ghcr.io, nothing else. -Outside of master, in pull requests and on other branches, BuildKit pulls the images from Docker Hub through `mirror.gcr.io`: anonymous pulls from Docker Hub fail with `429 Too Many Requests` once the IP address of the runner has reached its limit. -There, the webdevops images come from the artifacts of the run, so only official images like `php` and `composer` are pulled; an image that the mirror does not have comes from Docker Hub. -On master, the builds pull from Docker Hub directly: they take the parent images that the publish jobs have just pushed, and the mirror could still serve an older one. +BuildKit pulls the images from Docker Hub through `mirror.gcr.io`: anonymous pulls from Docker Hub fail with `429 Too Many Requests` once the IP address of the runner has reached its limit. +An image that the mirror does not have comes from Docker Hub. +The webdevops parent images never come from Docker Hub, where the mirror could serve an outdated one: in pull requests and on other branches they come from the artifacts of the run, on master from the image that the job of the parent pushed to ghcr.io in the same run (`ghcr.io/webdevops/:sha---`). +So only official images like `php` and `composer` go through the mirror. ## Building and testing locally diff --git a/ci/src/GithubJobBuilder.php b/ci/src/GithubJobBuilder.php index 98a9080e5..98c7f1cbc 100644 --- a/ci/src/GithubJobBuilder.php +++ b/ci/src/GithubJobBuilder.php @@ -40,11 +40,12 @@ class GithubJobBuilder private const string COMPOSER_AUTH_SECRET = 'COMPOSER_AUTH=COMPOSER_AUTH'; /** - * Outside of master, BuildKit pulls Docker Hub images through this mirror: anonymous pulls from Docker Hub fail - * with "429 Too Many Requests" once the runner's IP address has reached its limit. There, the webdevops parent - * images come from the artifacts of the run, so only official images like php and composer are pulled. BuildKit - * falls back to Docker Hub for an image that the mirror does not have. Master pulls the parent images that its - * publish jobs have just pushed, which the mirror could serve outdated, so it pulls from Docker Hub directly. + * BuildKit pulls Docker Hub images through this mirror: anonymous pulls from Docker Hub fail with "429 Too Many + * Requests" once the runner's IP address has reached its limit. The webdevops parent images never come from Docker + * Hub, where the mirror could serve an outdated one: outside of master they come from the artifacts of the run + * (buildContexts()), on master from ghcr.io (ghcrBuildContexts()). So only official images like php and composer + * go through the mirror, where an older copy does no harm. BuildKit falls back to Docker Hub for an image that the + * mirror does not have. */ private const string DOCKER_HUB_MIRROR = 'mirror.gcr.io'; @@ -122,14 +123,28 @@ public function getJobsDescription(array $node): array 'uses' => 'actions/checkout@v7', 'with' => ['persist-credentials' => false], ], - ...$this->setupBuildxSteps(), + $this->setupBuildxStep(), + [ + // Before the build, which takes the parent images from ghcr.io on master + 'if' => '${{github.ref == \'refs/heads/master\'}}', + 'name' => 'Login to ghcr.io', + 'uses' => 'docker/login-action@v4', + 'with' => [ + 'registry' => 'ghcr.io', + 'username' => '${{ github.actor }}', + 'password' => '${{ secrets.GITHUB_TOKEN }}', + ], + ], ...$this->downloadParentImageSteps($imageDependencies), array_filter([ 'name' => 'Build (load locally)', 'if' => $hasImageDependencies ? '${{ github.ref == \'refs/heads/master\' }}' : null, 'uses' => 'docker/build-push-action@v7', 'env' => self::COMPOSER_AUTH_ENV, - 'with' => $this->buildPushWith($node), + 'with' => array_merge( + $this->buildPushWith($node), + $hasImageDependencies ? ['build-contexts' => $this->ghcrBuildContexts($imageDependencies)] : [], + ), ], fn (array|string|null $value): bool => $value !== null), $hasImageDependencies ? [ 'name' => 'Build (load locally, from parent artifact)', @@ -160,16 +175,6 @@ public function getJobsDescription(array $node): array 'name' => 'run structure-test', 'run' => implode("\n", $structuredTests), ] : null, - [ - 'if' => '${{github.ref == \'refs/heads/master\'}}', - 'name' => 'Login to ghcr.io', - 'uses' => 'docker/login-action@v4', - 'with' => [ - 'registry' => 'ghcr.io', - 'username' => '${{ github.actor }}', - 'password' => '${{ secrets.GITHUB_TOKEN }}', - ], - ], [ 'name' => 'Push arch image', 'if' => '${{github.ref == \'refs/heads/master\'}}', @@ -297,7 +302,7 @@ private function buildPushWith(array $node): array 'context' => $this->context($node), 'platforms' => '${{ matrix.platform }}', 'load' => true, - 'tags' => 'ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $node['tag'], + 'tags' => $this->archImage($node['id']), // Re-run all jobs to test a fresh build of the full image chain. 'no-cache' => '${{ github.event_name == \'schedule\' || github.run_attempt > 1 }}', ...$this->buildCacheWith($node), @@ -309,25 +314,27 @@ private function buildPushWith(array $node): array } /** - * Sets up Buildx, outside of master with DOCKER_HUB_MIRROR for the images from Docker Hub. + * The image of one architecture that the job of $imageId builds and, on master, pushes to ghcr.io, e.g. + * "ghcr.io/webdevops/php:sha--amd64-8.4" for "webdevops/php:8.4". + */ + private function archImage(string $imageId): string + { + [$repository, $tag] = explode(':', $imageId, 2); + return 'ghcr.io/' . $repository . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $tag; + } + + /** + * Sets up Buildx with DOCKER_HUB_MIRROR for the images from Docker Hub. * - * @return list> + * @return array */ - private function setupBuildxSteps(): array + private function setupBuildxStep(): array { return [ - [ - 'name' => 'Set up Buildx', - 'if' => '${{ github.ref == \'refs/heads/master\' }}', - 'uses' => 'docker/setup-buildx-action@v4', - ], - [ - 'name' => 'Set up Buildx (Docker Hub through ' . self::DOCKER_HUB_MIRROR . ')', - 'if' => '${{ github.ref != \'refs/heads/master\' }}', - 'uses' => 'docker/setup-buildx-action@v4', - 'with' => [ - 'buildkitd-config-inline' => "[registry.\"docker.io\"]\n mirrors = [\"" . self::DOCKER_HUB_MIRROR . '"]', - ], + 'name' => 'Set up Buildx (Docker Hub through ' . self::DOCKER_HUB_MIRROR . ')', + 'uses' => 'docker/setup-buildx-action@v4', + 'with' => [ + 'buildkitd-config-inline' => "[registry.\"docker.io\"]\n mirrors = [\"" . self::DOCKER_HUB_MIRROR . '"]', ], ]; } @@ -450,6 +457,24 @@ private function buildContexts(array $imageDependencies): string return implode("\n", $lines); } + /** + * Buildx `build-contexts` value of master, mapping every literal FROM/COPY --from reference in $imageDependencies to + * the image that the job of that dependency pushed to ghcr.io in the same run ("Push arch image"); the dependencies + * are built before this job, as for the artifacts of buildContexts(). BuildKit thus never pulls a webdevops image + * from Docker Hub, where its mirror could serve an outdated one, and the build uses the parent image of its commit. + * + * @param array $imageDependencies + */ + private function ghcrBuildContexts(array $imageDependencies): string + { + $lines = []; + foreach ($imageDependencies as $literalRef => $imageId) { + $lines[] = $literalRef . '=docker-image://' . $this->archImage($imageId); + } + + return implode("\n", $lines); + } + /** * Command of the image test step, null if the image has no tests in ci/image-tests: make test-image-run, the command * of the docs, runs the tests against the image this job built, with the runner that the step before built. @@ -509,7 +534,7 @@ public function getImageTestRunnerConfig(): array 'uses' => 'actions/checkout@v7', 'with' => ['persist-credentials' => false], ], - ...$this->setupBuildxSteps(), + $this->setupBuildxStep(), [ 'name' => 'Build the image test runner', 'uses' => 'docker/build-push-action@v7', diff --git a/ci/tests/GithubJobBuilderTest.php b/ci/tests/GithubJobBuilderTest.php index 22a66977a..72c4c271c 100644 --- a/ci/tests/GithubJobBuilderTest.php +++ b/ci/tests/GithubJobBuilderTest.php @@ -63,7 +63,6 @@ public function testImageTestRunnerIsBuiltOncePerArchitectureIntoTheCache(): voi self::assertSame('${{ matrix.runner }}', $job['runs-on']); self::assertSame([ 'actions/checkout@v7', - 'Set up Buildx', 'Set up Buildx (Docker Hub through mirror.gcr.io)', 'Build the image test runner', ], array_keys($steps)); @@ -78,7 +77,7 @@ public function testImageTestRunnerIsBuiltOncePerArchitectureIntoTheCache(): voi self::assertTrue($steps['Build the image test runner']['continue-on-error'], 'a failure must not skip the image jobs that need this job'); } - public function testDockerHubImagesComeThroughTheMirrorOutsideOfMaster(): void + public function testDockerHubImagesComeThroughTheMirror(): void { $jobSteps = [ 'image job' => $this->steps($this->jobs()), @@ -86,24 +85,14 @@ public function testDockerHubImagesComeThroughTheMirrorOutsideOfMaster(): void ]; foreach ($jobSteps as $job => $steps) { - self::assertSame( - [ - 'name' => 'Set up Buildx', - 'if' => '${{ github.ref == \'refs/heads/master\' }}', - 'uses' => 'docker/setup-buildx-action@v4', - ], - $steps['Set up Buildx'], - $job . ': master pulls the parent images that were just published, which the mirror could serve outdated', - ); self::assertSame( [ 'name' => 'Set up Buildx (Docker Hub through mirror.gcr.io)', - 'if' => '${{ github.ref != \'refs/heads/master\' }}', 'uses' => 'docker/setup-buildx-action@v4', 'with' => ['buildkitd-config-inline' => "[registry.\"docker.io\"]\n mirrors = [\"mirror.gcr.io\"]"], ], $steps['Set up Buildx (Docker Hub through mirror.gcr.io)'], - $job, + $job . ': on master too, because no build takes a webdevops image from Docker Hub', ); } } @@ -143,16 +132,16 @@ public function testImageWithoutDependenciesIsBuiltOnce(): void self::assertSame([ 'actions/checkout@v7', - 'Set up Buildx', 'Set up Buildx (Docker Hub through mirror.gcr.io)', + 'Login to ghcr.io', 'Build (load locally)', 'Build the image test runner', 'run image tests', 'run structure-test', - 'Login to ghcr.io', 'Push arch image', ], array_keys($steps)); self::assertArrayNotHasKey('if', $steps['Build (load locally)']); + self::assertArrayNotHasKey('build-contexts', $steps['Build (load locally)']['with']); self::assertSame( 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine', $steps['Push arch image']['run'], @@ -216,7 +205,7 @@ public function testImageWithoutTestsHasNoTestSteps(): void self::assertArrayNotHasKey('run structure-test', $steps); } - public function testBranchBuildUsesTheParentImagesOfThisRun(): void + public function testBuildsUseTheParentImagesOfThisRun(): void { $steps = $this->steps($this->jobs([ 'imageParent' => 'webdevops/base:ubuntu-22.04', @@ -226,8 +215,8 @@ public function testBranchBuildUsesTheParentImagesOfThisRun(): void self::assertSame([ 'actions/checkout@v7', - 'Set up Buildx', 'Set up Buildx (Docker Hub through mirror.gcr.io)', + 'Login to ghcr.io', 'Download parent image (OCI layout): webdevops/base:ubuntu-22.04', 'Download parent image (OCI layout): webdevops/toolbox:latest', 'Build (load locally)', @@ -235,7 +224,6 @@ public function testBranchBuildUsesTheParentImagesOfThisRun(): void 'Build the image test runner', 'run image tests', 'run structure-test', - 'Login to ghcr.io', 'Push arch image', ], array_keys($steps)); self::assertSame( @@ -244,7 +232,12 @@ public function testBranchBuildUsesTheParentImagesOfThisRun(): void ); self::assertSame('${{ github.ref != \'refs/heads/master\' }}', $steps['Download parent image (OCI layout): webdevops/base:ubuntu-22.04']['if']); self::assertSame('${{ github.ref == \'refs/heads/master\' }}', $steps['Build (load locally)']['if']); - self::assertArrayNotHasKey('build-contexts', $steps['Build (load locally)']['with']); + self::assertSame( + "webdevops/base:latest=docker-image://ghcr.io/webdevops/base:sha-\${{ github.sha }}-\${{ matrix.arch }}-ubuntu-22.04\n" + . 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest', + $steps['Build (load locally)']['with']['build-contexts'], + 'master takes the parent images that their jobs pushed to ghcr.io in the same run', + ); self::assertSame('${{ github.ref != \'refs/heads/master\' }}', $steps['Build (load locally, from parent artifact)']['if']); self::assertSame( "webdevops/base:latest=oci-layout://.ci-oci-image/base_ubuntu-22-04:ci-parent-image\n" @@ -253,6 +246,19 @@ public function testBranchBuildUsesTheParentImagesOfThisRun(): void ); } + public function testMasterTakesTheImageThatTheJobOfTheParentPushes(): void + { + $parent = $this->steps( + $this->jobs(['id' => 'webdevops/base:ubuntu-22.04', 'name' => 'webdevops/base:ubuntu-22.04', 'tag' => 'ubuntu-22.04']), + 'base_ubuntu-22-04', + ); + $child = $this->steps($this->jobs(['imageParent' => 'webdevops/base:ubuntu-22.04', 'imageParentRef' => 'webdevops/base:latest'])); + + $pushed = $parent['Build (load locally)']['with']['tags']; + self::assertSame('docker push ' . $pushed, str_replace('"', '', $parent['Push arch image']['run'])); + self::assertSame('webdevops/base:latest=docker-image://' . $pushed, $child['Build (load locally)']['with']['build-contexts']); + } + public function testParentThatIsAlsoCopiedFromIsDownloadedOnce(): void { $steps = $this->steps($this->jobs([ From b921d03c66111cc27cede84a63d174b065958257 Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Sun, 15 Nov 2026 20:03:59 +0000 Subject: [PATCH 3/5] [TASK] Give only the jobs that push images write access to packages The workflow gave packages: write to every job. Now the token may only read the repository, and only the image jobs and the publish jobs, which push to ghcr.io, may also write packages (SonarCloud githubactions:S8233). The ghcr.io image of one architecture is written in one place now, which also quotes the image name of "docker push" as a whole. --- .github/workflows/build.yaml | 407 +++++++++++++++--- CONTRIBUTING.md | 2 +- ci/src/Commands/GenerateGithubCiCommand.php | 5 +- ci/src/GithubJobBuilder.php | 32 +- .../Commands/GenerateGithubCiCommandTest.php | 8 +- ci/tests/GithubJobBuilderTest.php | 6 +- 6 files changed, 379 insertions(+), 81 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4dc2f7cc5..2e9cc4ad7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,7 +12,6 @@ name: build workflow_dispatch: null permissions: contents: read - packages: write jobs: validate-automation: name: 'Validate Automation' @@ -97,6 +96,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -174,10 +176,12 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/apache:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + 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 + permissions: + packages: write needs: apache_alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -228,6 +232,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -310,10 +317,12 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + 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 + permissions: + packages: write needs: base-app_alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -364,6 +373,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -446,7 +458,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04' + run: 'docker push "ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -476,6 +488,8 @@ jobs: base-app_ubuntu-22-04_publish: name: 'webdevops/base-app:ubuntu-22.04 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: base-app_ubuntu-22-04 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -528,6 +542,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -610,7 +627,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + run: 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -640,6 +657,8 @@ jobs: base_alpine_publish: name: 'webdevops/base:alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: base_alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -690,6 +709,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -772,7 +794,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04' + run: 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -802,6 +824,8 @@ jobs: base_ubuntu-22-04_publish: name: 'webdevops/base:ubuntu-22.04 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: base_ubuntu-22-04 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -854,6 +878,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -936,7 +963,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + run: 'docker push "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -966,6 +993,8 @@ jobs: bootstrap_alpine_publish: name: 'webdevops/bootstrap:alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: bootstrap_alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -1016,6 +1045,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1098,7 +1130,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}"-ubuntu-22.04' + run: 'docker push "ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1128,6 +1160,8 @@ jobs: bootstrap_ubuntu-22-04_publish: name: 'webdevops/bootstrap:ubuntu-22.04 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: bootstrap_ubuntu-22-04 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -1180,6 +1214,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1257,10 +1294,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: dockerfile-build-env_latest if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -1311,6 +1350,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1388,10 +1430,12 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine' + 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 + permissions: + packages: write needs: nginx_alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -1442,6 +1486,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1519,7 +1566,7 @@ jobs: - 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' + 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 @@ -1539,6 +1586,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1616,10 +1666,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-apache-dev_8-2-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -1654,6 +1706,8 @@ jobs: php-apache-dev_8-2_publish: name: 'webdevops/php-apache-dev:8.2 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache-dev_8-2 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -1704,6 +1758,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1781,7 +1838,7 @@ jobs: - 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' + 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 @@ -1801,6 +1858,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1878,10 +1938,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-apache-dev_8-3-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -1916,6 +1978,8 @@ jobs: php-apache-dev_8-3_publish: name: 'webdevops/php-apache-dev:8.3 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache-dev_8-3 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -1966,6 +2030,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2043,7 +2110,7 @@ jobs: - 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' + 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 @@ -2063,6 +2130,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2140,10 +2210,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-apache-dev_8-4-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -2178,6 +2250,8 @@ jobs: php-apache-dev_8-4_publish: name: 'webdevops/php-apache-dev:8.4 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache-dev_8-4 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -2228,6 +2302,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2305,7 +2382,7 @@ jobs: - 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' + 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 @@ -2325,6 +2402,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2402,10 +2482,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-apache-dev_8-5-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -2440,6 +2522,8 @@ jobs: php-apache-dev_8-5_publish: name: 'webdevops/php-apache-dev:8.5 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache-dev_8-5 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -2490,6 +2574,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2567,7 +2654,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2613,6 +2700,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2690,7 +2780,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2720,6 +2810,8 @@ jobs: php-apache_8-2-alpine_publish: name: 'webdevops/php-apache:8.2-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache_8-2-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -2754,6 +2846,8 @@ jobs: php-apache_8-2_publish: name: 'webdevops/php-apache:8.2 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache_8-2 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -2804,6 +2898,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2881,7 +2978,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2927,6 +3024,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3004,7 +3104,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3034,6 +3134,8 @@ jobs: php-apache_8-3-alpine_publish: name: 'webdevops/php-apache:8.3-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache_8-3-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -3068,6 +3170,8 @@ jobs: php-apache_8-3_publish: name: 'webdevops/php-apache:8.3 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache_8-3 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -3118,6 +3222,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3195,7 +3302,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3241,6 +3348,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3318,7 +3428,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3348,6 +3458,8 @@ jobs: php-apache_8-4-alpine_publish: name: 'webdevops/php-apache:8.4-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache_8-4-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -3382,6 +3494,8 @@ jobs: php-apache_8-4_publish: name: 'webdevops/php-apache:8.4 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache_8-4 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -3432,6 +3546,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3509,7 +3626,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3555,6 +3672,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3632,7 +3752,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' + run: 'docker push "ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3662,6 +3782,8 @@ jobs: php-apache_8-5-alpine_publish: name: 'webdevops/php-apache:8.5-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache_8-5-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -3696,6 +3818,8 @@ jobs: php-apache_8-5_publish: name: 'webdevops/php-apache:8.5 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-apache_8-5 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -3746,6 +3870,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3828,7 +3955,7 @@ jobs: - 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' + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2"' php-dev_8-2-alpine: strategy: fail-fast: false @@ -3848,6 +3975,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3930,10 +4060,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-dev_8-2-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -3968,6 +4100,8 @@ jobs: php-dev_8-2_publish: name: 'webdevops/php-dev:8.2 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-dev_8-2 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -4018,6 +4152,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4100,7 +4237,7 @@ jobs: - 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' + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3"' php-dev_8-3-alpine: strategy: fail-fast: false @@ -4120,6 +4257,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4202,10 +4342,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-dev_8-3-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -4240,6 +4382,8 @@ jobs: php-dev_8-3_publish: name: 'webdevops/php-dev:8.3 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-dev_8-3 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -4290,6 +4434,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4372,7 +4519,7 @@ jobs: - 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' + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4"' php-dev_8-4-alpine: strategy: fail-fast: false @@ -4392,6 +4539,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4474,10 +4624,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-dev_8-4-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -4512,6 +4664,8 @@ jobs: php-dev_8-4_publish: name: 'webdevops/php-dev:8.4 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-dev_8-4 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -4562,6 +4716,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4644,7 +4801,7 @@ jobs: - 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' + run: 'docker push "ghcr.io/webdevops/php-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5"' php-dev_8-5-alpine: strategy: fail-fast: false @@ -4664,6 +4821,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4746,10 +4906,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-dev_8-5-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -4784,6 +4946,8 @@ jobs: php-dev_8-5_publish: name: 'webdevops/php-dev:8.5 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-dev_8-5 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -4834,6 +4998,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4911,7 +5078,7 @@ jobs: - 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' + 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 @@ -4931,6 +5098,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5008,10 +5178,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-nginx-dev_8-2-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -5046,6 +5218,8 @@ jobs: php-nginx-dev_8-2_publish: name: 'webdevops/php-nginx-dev:8.2 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx-dev_8-2 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -5096,6 +5270,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5173,7 +5350,7 @@ jobs: - 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' + 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 @@ -5193,6 +5370,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5270,10 +5450,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-nginx-dev_8-3-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -5308,6 +5490,8 @@ jobs: php-nginx-dev_8-3_publish: name: 'webdevops/php-nginx-dev:8.3 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx-dev_8-3 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -5358,6 +5542,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5435,7 +5622,7 @@ jobs: - 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' + 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 @@ -5455,6 +5642,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5532,10 +5722,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-nginx-dev_8-4-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -5570,6 +5762,8 @@ jobs: php-nginx-dev_8-4_publish: name: 'webdevops/php-nginx-dev:8.4 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx-dev_8-4 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -5620,6 +5814,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5697,7 +5894,7 @@ jobs: - 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' + 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 @@ -5717,6 +5914,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5794,10 +5994,12 @@ jobs: - 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' + 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 + permissions: + packages: write needs: php-nginx-dev_8-5-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -5832,6 +6034,8 @@ jobs: php-nginx-dev_8-5_publish: name: 'webdevops/php-nginx-dev:8.5 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx-dev_8-5 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -5882,6 +6086,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5964,7 +6171,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6010,6 +6217,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6092,7 +6302,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6122,6 +6332,8 @@ jobs: php-nginx_8-2-alpine_publish: name: 'webdevops/php-nginx:8.2-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx_8-2-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -6156,6 +6368,8 @@ jobs: php-nginx_8-2_publish: name: 'webdevops/php-nginx:8.2 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx_8-2 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -6206,6 +6420,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6288,7 +6505,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6334,6 +6551,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6416,7 +6636,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6446,6 +6666,8 @@ jobs: php-nginx_8-3-alpine_publish: name: 'webdevops/php-nginx:8.3-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx_8-3-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -6480,6 +6702,8 @@ jobs: php-nginx_8-3_publish: name: 'webdevops/php-nginx:8.3 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx_8-3 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -6530,6 +6754,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6612,7 +6839,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6658,6 +6885,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6740,7 +6970,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6770,6 +7000,8 @@ jobs: php-nginx_8-4-alpine_publish: name: 'webdevops/php-nginx:8.4-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx_8-4-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -6804,6 +7036,8 @@ jobs: php-nginx_8-4_publish: name: 'webdevops/php-nginx:8.4 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx_8-4 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -6854,6 +7088,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6936,7 +7173,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6982,6 +7219,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7064,7 +7304,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' + run: 'docker push "ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7094,6 +7334,8 @@ jobs: php-nginx_8-5-alpine_publish: name: 'webdevops/php-nginx:8.5-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx_8-5-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -7128,6 +7370,8 @@ jobs: php-nginx_8-5_publish: name: 'webdevops/php-nginx:8.5 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php-nginx_8-5 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -7178,6 +7422,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7260,7 +7507,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2' + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7306,6 +7553,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7388,7 +7638,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.2-alpine' + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7418,6 +7668,8 @@ jobs: php_8-2-alpine_publish: name: 'webdevops/php:8.2-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php_8-2-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -7454,6 +7706,8 @@ jobs: php_8-2_publish: name: 'webdevops/php:8.2 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php_8-2 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -7506,6 +7760,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7588,7 +7845,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3' + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7634,6 +7891,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7716,7 +7976,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.3-alpine' + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7746,6 +8006,8 @@ jobs: php_8-3-alpine_publish: name: 'webdevops/php:8.3-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php_8-3-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -7782,6 +8044,8 @@ jobs: php_8-3_publish: name: 'webdevops/php:8.3 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php_8-3 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -7834,6 +8098,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7916,7 +8183,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4' + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7962,6 +8229,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -8044,7 +8314,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.4-alpine' + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8074,6 +8344,8 @@ jobs: php_8-4-alpine_publish: name: 'webdevops/php:8.4-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php_8-4-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -8110,6 +8382,8 @@ jobs: php_8-4_publish: name: 'webdevops/php:8.4 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php_8-4 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -8162,6 +8436,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -8244,7 +8521,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5' + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8290,6 +8567,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -8372,7 +8652,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}"-8.5-alpine' + run: 'docker push "ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8402,6 +8682,8 @@ jobs: php_8-5-alpine_publish: name: 'webdevops/php:8.5-alpine - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php_8-5-alpine if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -8438,6 +8720,8 @@ jobs: php_8-5_publish: name: 'webdevops/php:8.5 - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: php_8-5 if: "${{github.ref == 'refs/heads/master'}}" steps: @@ -8488,6 +8772,9 @@ jobs: needs: validate-automation if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -8527,7 +8814,7 @@ jobs: - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" - run: 'docker push "ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}"-latest' + run: 'docker push "ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest"' - name: 'Export image (OCI layout)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8556,6 +8843,8 @@ jobs: toolbox_latest_publish: name: 'webdevops/toolbox:latest - Publish' runs-on: ubuntu-latest + permissions: + packages: write needs: toolbox_latest if: "${{github.ref == 'refs/heads/master'}}" steps: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bfec2ee6f..19b3a5d86 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,7 +56,7 @@ defined for it before pushing it to Docker Hub. The CI also uses `ghcr.io/webdev internally; pull the images from Docker Hub. The build steps pass the token of the run (`GITHUB_TOKEN`) to Docker as the build secret `COMPOSER_AUTH`, for PIE (see [PHP extension builds](#php-extension-builds)). -The workflow gives this token read access to the repository and write access to the packages on ghcr.io, nothing else. +The token may only read the repository; only the jobs that push images to ghcr.io may also write packages there. BuildKit pulls the images from Docker Hub through `mirror.gcr.io`: anonymous pulls from Docker Hub fail with `429 Too Many Requests` once the IP address of the runner has reached its limit. An image that the mirror does not have comes from Docker Hub. diff --git a/ci/src/Commands/GenerateGithubCiCommand.php b/ci/src/Commands/GenerateGithubCiCommand.php index 36bb54946..ee3618d80 100644 --- a/ci/src/Commands/GenerateGithubCiCommand.php +++ b/ci/src/Commands/GenerateGithubCiCommand.php @@ -109,11 +109,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int ], 'workflow_dispatch' => null, ], - // The build steps hand GITHUB_TOKEN to the RUN instructions with PIE, and with them to every script those - // instructions run, so the token may only read the repository and push the images to ghcr.io. + // The token may only read the repository; the jobs that push images to ghcr.io get packages: write + // themselves (GithubJobBuilder::PUSH_PERMISSIONS). 'permissions' => [ 'contents' => 'read', - 'packages' => 'write', ], 'jobs' => $this->jobs, ]; diff --git a/ci/src/GithubJobBuilder.php b/ci/src/GithubJobBuilder.php index 98c7f1cbc..45bea012e 100644 --- a/ci/src/GithubJobBuilder.php +++ b/ci/src/GithubJobBuilder.php @@ -39,6 +39,12 @@ class GithubJobBuilder private const string COMPOSER_AUTH_SECRET = 'COMPOSER_AUTH=COMPOSER_AUTH'; + /** + * The workflow gives the token only read access to the repository; the image jobs may also push to ghcr.io. The + * build steps hand the token to every script of the RUN instructions with PIE, so it gets nothing more. + */ + private const array PUSH_PERMISSIONS = ['contents' => 'read', 'packages' => 'write']; + /** * BuildKit pulls Docker Hub images through this mirror: anonymous pulls from Docker Hub fail with "429 Too Many * Requests" once the runner's IP address has reached its limit. The webdevops parent images never come from Docker @@ -115,6 +121,8 @@ public function getJobsDescription(array $node): array // even run if previous job skipped 'if' => '${{ !failure() && !cancelled() }}', 'runs-on' => '${{ matrix.runner }}', + // pushes its image to ghcr.io on master and takes the parent images from there + 'permissions' => self::PUSH_PERMISSIONS, 'container' => 'webdevops/dockerfile-build-env', 'steps' => array_values( array_filter( @@ -178,7 +186,7 @@ public function getJobsDescription(array $node): array [ 'name' => 'Push arch image', 'if' => '${{github.ref == \'refs/heads/master\'}}', - 'run' => 'docker push "ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}"-' . $node['tag'], + 'run' => 'docker push "' . $this->archImage($node['image'], $node['tag']) . '"', ], $hasChildren ? [ 'name' => 'Export image (OCI layout)', @@ -227,6 +235,7 @@ public function getJobsDescription(array $node): array $jobId . '_publish' => [ 'name' => $node['name'] . ' - Publish', 'runs-on' => 'ubuntu-latest', + 'permissions' => ['packages' => 'write'], 'needs' => $jobId, 'if' => '${{github.ref == \'refs/heads/master\'}}', 'steps' => [ @@ -302,7 +311,7 @@ private function buildPushWith(array $node): array 'context' => $this->context($node), 'platforms' => '${{ matrix.platform }}', 'load' => true, - 'tags' => $this->archImage($node['id']), + 'tags' => $this->archImage($node['image'], $node['tag']), // Re-run all jobs to test a fresh build of the full image chain. 'no-cache' => '${{ github.event_name == \'schedule\' || github.run_attempt > 1 }}', ...$this->buildCacheWith($node), @@ -314,13 +323,12 @@ private function buildPushWith(array $node): array } /** - * The image of one architecture that the job of $imageId builds and, on master, pushes to ghcr.io, e.g. - * "ghcr.io/webdevops/php:sha--amd64-8.4" for "webdevops/php:8.4". + * The image of one architecture that the job of webdevops/$image:$tag builds and, on master, pushes to ghcr.io, + * e.g. "ghcr.io/webdevops/php:sha--amd64-8.4". */ - private function archImage(string $imageId): string + private function archImage(string $image, string $tag): string { - [$repository, $tag] = explode(':', $imageId, 2); - return 'ghcr.io/' . $repository . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $tag; + return 'ghcr.io/webdevops/' . $image . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $tag; } /** @@ -469,7 +477,9 @@ private function ghcrBuildContexts(array $imageDependencies): string { $lines = []; foreach ($imageDependencies as $literalRef => $imageId) { - $lines[] = $literalRef . '=docker-image://' . $this->archImage($imageId); + // e.g. "webdevops/php:8.4" + [$repository, $tag] = explode(':', $imageId, 2); + $lines[] = $literalRef . '=docker-image://' . $this->archImage(substr($repository, strlen('webdevops/')), $tag); } return implode("\n", $lines); @@ -488,7 +498,7 @@ private function imageTests(array $node): ?string } return 'make test-image-run IMAGE=' . $node['id'] - . ' REFERENCE=ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $node['tag']; + . ' REFERENCE=' . $this->archImage($node['image'], $node['tag']); } /** @@ -503,9 +513,9 @@ private function structuredTests(array $node): array if (file_exists($this->rootPath . '/tests/structure-test/' . $node['image'] . '/test.yaml')) { $script[] = 'cd tests/structure-test'; if (file_exists($this->rootPath . '/tests/structure-test/' . $node['image'] . '/' . $node['tag'] . '/test.yaml')) { - $script[] = '/usr/local/bin/container-structure-test test --image ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $node['tag'] . ' --config ' . $node['image'] . '/test.yaml --config ' . $node['image'] . '/' . $node['tag'] . '/test.yaml'; + $script[] = '/usr/local/bin/container-structure-test test --image ' . $this->archImage($node['image'], $node['tag']) . ' --config ' . $node['image'] . '/test.yaml --config ' . $node['image'] . '/' . $node['tag'] . '/test.yaml'; } else { - $script[] = '/usr/local/bin/container-structure-test test --image ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $node['tag'] . ' --config ' . $node['image'] . '/test.yaml'; + $script[] = '/usr/local/bin/container-structure-test test --image ' . $this->archImage($node['image'], $node['tag']) . ' --config ' . $node['image'] . '/test.yaml'; } } diff --git a/ci/tests/Commands/GenerateGithubCiCommandTest.php b/ci/tests/Commands/GenerateGithubCiCommandTest.php index 3706903b0..a0943d1bd 100644 --- a/ci/tests/Commands/GenerateGithubCiCommandTest.php +++ b/ci/tests/Commands/GenerateGithubCiCommandTest.php @@ -72,11 +72,9 @@ public function testWritesTheWorkflowWithTheValidationFirstAndTheImageJobsSorted 'pull_request' => ['branches' => ['master']], 'workflow_dispatch' => null, ], $workflow['on']); - self::assertSame( - ['contents' => 'read', 'packages' => 'write'], - $workflow['permissions'], - 'the build steps hand the token to the scripts of the Dockerfiles', - ); + self::assertSame(['contents' => 'read'], $workflow['permissions'], 'only the jobs that push may write packages'); + self::assertArrayNotHasKey('permissions', $workflow['jobs']['validate-automation']); + self::assertArrayNotHasKey('permissions', $workflow['jobs']['image-test-runner']); self::assertSame(self::ALL_JOBS, array_keys($workflow['jobs'])); self::assertSame('Validate Automation', $workflow['jobs']['validate-automation']['name']); } diff --git a/ci/tests/GithubJobBuilderTest.php b/ci/tests/GithubJobBuilderTest.php index 72c4c271c..c67514f25 100644 --- a/ci/tests/GithubJobBuilderTest.php +++ b/ci/tests/GithubJobBuilderTest.php @@ -44,6 +44,8 @@ public function testBuildAndPublishJob(): void self::assertSame('${{ matrix.runner }}', $jobs['base_alpine']['runs-on']); self::assertSame('webdevops/dockerfile-build-env', $jobs['base_alpine']['container']); self::assertSame('base_alpine', $jobs['base_alpine_publish']['needs']); + self::assertSame(['contents' => 'read', 'packages' => 'write'], $jobs['base_alpine']['permissions'], 'pushes to and pulls from ghcr.io'); + self::assertSame(['packages' => 'write'], $jobs['base_alpine_publish']['permissions'], 'pushes to ghcr.io, needs no checkout'); self::assertSame('${{github.ref == \'refs/heads/master\'}}', $jobs['base_alpine_publish']['if']); } @@ -143,7 +145,7 @@ public function testImageWithoutDependenciesIsBuiltOnce(): void self::assertArrayNotHasKey('if', $steps['Build (load locally)']); self::assertArrayNotHasKey('build-contexts', $steps['Build (load locally)']['with']); self::assertSame( - 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}"-alpine', + 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine"', $steps['Push arch image']['run'], ); } @@ -255,7 +257,7 @@ public function testMasterTakesTheImageThatTheJobOfTheParentPushes(): void $child = $this->steps($this->jobs(['imageParent' => 'webdevops/base:ubuntu-22.04', 'imageParentRef' => 'webdevops/base:latest'])); $pushed = $parent['Build (load locally)']['with']['tags']; - self::assertSame('docker push ' . $pushed, str_replace('"', '', $parent['Push arch image']['run'])); + self::assertSame('docker push "' . $pushed . '"', $parent['Push arch image']['run']); self::assertSame('webdevops/base:latest=docker-image://' . $pushed, $child['Build (load locally)']['with']['build-contexts']); } From 0476776333983aa370e47ab84a733172b9582d23 Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Sun, 15 Nov 2026 20:40:01 +0000 Subject: [PATCH 4/5] [TASK] Name the ghcr.io images in one place and pass the token in build-local.sh The publish jobs wrote the ghcr.io images of amd64 and arm64 by hand; they now take them from archImage() and PLATFORMS, like the image jobs. The login to ghcr.io is a helper used by both jobs. The workflow does not change. build-local.sh passes COMPOSER_AUTH to docker build when it is set, so a local build of all PHP images of a version can use a token for PIE too. The comments say what the token of the run can do: every script of the RUN instructions with PIE can read it, and in the image jobs it may push to ghcr.io; all PIE requests share the limit of GITHUB_TOKEN. --- CONTRIBUTING.md | 2 ++ build-local.sh | 30 ++++++++++------- ci/src/GithubJobBuilder.php | 65 ++++++++++++++++++++++++------------- 3 files changed, 62 insertions(+), 35 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 19b3a5d86..7f14215e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -138,6 +138,8 @@ export COMPOSER_AUTH='{"github-oauth":{"github.com":""}}' docker build --secret id=COMPOSER_AUTH,env=COMPOSER_AUTH -t webdevops/php:8.5 docker/php/8.5 ``` +`./build-local.sh` passes the secret on when `COMPOSER_AUTH` is set. + Protobuf, Vips and XML-RPC are built directly from their official upstream sources. The existing XML-RPC **1.0.0RC3** pin is preserved on all supported PHP versions. Protobuf on PHP 8.2–8.5 uses the latest upstream release. If a future release raises its minimum PHP diff --git a/build-local.sh b/build-local.sh index 83755a21c..bab88eb7e 100755 --- a/build-local.sh +++ b/build-local.sh @@ -15,24 +15,30 @@ if [ "$#" -gt 0 ]; then fi fi +# PIE takes a GitHub token from COMPOSER_AUTH, see "PHP extension builds" in CONTRIBUTING.md +SECRET="" +if [ -n "${COMPOSER_AUTH:-}" ]; then + SECRET="--secret id=COMPOSER_AUTH,env=COMPOSER_AUTH" +fi + # alpine -docker build -t webdevops/php:$PHP_VERSION-alpine docker/php/$PHP_VERSION-alpine -docker build -t webdevops/php-dev:$PHP_VERSION-alpine docker/php-dev/$PHP_VERSION-alpine +docker build $SECRET -t webdevops/php:$PHP_VERSION-alpine docker/php/$PHP_VERSION-alpine +docker build $SECRET -t webdevops/php-dev:$PHP_VERSION-alpine docker/php-dev/$PHP_VERSION-alpine -docker build -t webdevops/php-nginx:$PHP_VERSION-alpine docker/php-nginx/$PHP_VERSION-alpine -docker build -t webdevops/php-nginx-dev:$PHP_VERSION-alpine docker/php-nginx-dev/$PHP_VERSION-alpine +docker build $SECRET -t webdevops/php-nginx:$PHP_VERSION-alpine docker/php-nginx/$PHP_VERSION-alpine +docker build $SECRET -t webdevops/php-nginx-dev:$PHP_VERSION-alpine docker/php-nginx-dev/$PHP_VERSION-alpine -docker build -t webdevops/php-apache:$PHP_VERSION-alpine docker/php-apache/$PHP_VERSION-alpine -docker build -t webdevops/php-apache-dev:$PHP_VERSION-alpine docker/php-apache-dev/$PHP_VERSION-alpine +docker build $SECRET -t webdevops/php-apache:$PHP_VERSION-alpine docker/php-apache/$PHP_VERSION-alpine +docker build $SECRET -t webdevops/php-apache-dev:$PHP_VERSION-alpine docker/php-apache-dev/$PHP_VERSION-alpine # debian -docker build -t webdevops/php:$PHP_VERSION docker/php/$PHP_VERSION -docker build -t webdevops/php-dev:$PHP_VERSION docker/php-dev/$PHP_VERSION +docker build $SECRET -t webdevops/php:$PHP_VERSION docker/php/$PHP_VERSION +docker build $SECRET -t webdevops/php-dev:$PHP_VERSION docker/php-dev/$PHP_VERSION -docker build -t webdevops/php-nginx:$PHP_VERSION docker/php-nginx/$PHP_VERSION -docker build -t webdevops/php-nginx-dev:$PHP_VERSION docker/php-nginx-dev/$PHP_VERSION +docker build $SECRET -t webdevops/php-nginx:$PHP_VERSION docker/php-nginx/$PHP_VERSION +docker build $SECRET -t webdevops/php-nginx-dev:$PHP_VERSION docker/php-nginx-dev/$PHP_VERSION -docker build -t webdevops/php-apache:$PHP_VERSION docker/php-apache/$PHP_VERSION -docker build -t webdevops/php-apache-dev:$PHP_VERSION docker/php-apache-dev/$PHP_VERSION +docker build $SECRET -t webdevops/php-apache:$PHP_VERSION docker/php-apache/$PHP_VERSION +docker build $SECRET -t webdevops/php-apache-dev:$PHP_VERSION docker/php-apache-dev/$PHP_VERSION docker images | grep webdevops | grep $PHP_VERSION diff --git a/ci/src/GithubJobBuilder.php b/ci/src/GithubJobBuilder.php index 45bea012e..cefa5b5f4 100644 --- a/ci/src/GithubJobBuilder.php +++ b/ci/src/GithubJobBuilder.php @@ -32,6 +32,14 @@ class GithubJobBuilder * github.com". The build steps pass the token of the run as the secret COMPOSER_AUTH, which the RUN instructions * with PIE mount as an environment variable for Composer, on which PIE builds. Pull requests from forks get a * read-only token too. + * + * Every script of those RUN instructions can read the token, not only PIE: the installers of Composer and Blackfire + * and the build systems of the extensions. In the image jobs it may push to ghcr.io (PUSH_PERMISSIONS), and a token + * cannot have fewer permissions in one step. The token ends with the job. + * + * With the token, the PIE requests of all jobs and runs share one limit, that of GITHUB_TOKEN per repository, + * instead of the anonymous limit of each runner's IP address: 7 extensions in 16 PHP jobs and Xdebug in 48 + * development jobs per run. */ private const array COMPOSER_AUTH_ENV = [ 'COMPOSER_AUTH' => '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}', @@ -40,8 +48,9 @@ class GithubJobBuilder private const string COMPOSER_AUTH_SECRET = 'COMPOSER_AUTH=COMPOSER_AUTH'; /** - * The workflow gives the token only read access to the repository; the image jobs may also push to ghcr.io. The - * build steps hand the token to every script of the RUN instructions with PIE, so it gets nothing more. + * The workflow gives the token only read access to the repository; the image jobs may also push their images to + * ghcr.io and pull their parent images from there. The token gets no other permission, because the build steps + * hand it to every script of the RUN instructions with PIE (COMPOSER_AUTH_ENV). */ private const array PUSH_PERMISSIONS = ['contents' => 'read', 'packages' => 'write']; @@ -108,6 +117,13 @@ public function getJobsDescription(array $node): array $pushTags[] = '-t "ghcr.io/' . $alias . '"'; } + // The images of every architecture that the image job pushed ("Push arch image") + $archImages = array_map( + fn (array $platform): string => '"' . $this->archImage($node['image'], $node['tag'], $platform['arch']) . '"', + self::PLATFORMS, + ); + $archImages[array_key_last($archImages)] .= ' && exit 0'; + return [ $jobId => [ 'strategy' => [ @@ -135,13 +151,7 @@ public function getJobsDescription(array $node): array [ // Before the build, which takes the parent images from ghcr.io on master 'if' => '${{github.ref == \'refs/heads/master\'}}', - 'name' => 'Login to ghcr.io', - 'uses' => 'docker/login-action@v4', - 'with' => [ - 'registry' => 'ghcr.io', - 'username' => '${{ github.actor }}', - 'password' => '${{ secrets.GITHUB_TOKEN }}', - ], + ...$this->loginGhcrStep(), ], ...$this->downloadParentImageSteps($imageDependencies), array_filter([ @@ -240,15 +250,7 @@ public function getJobsDescription(array $node): array 'if' => '${{github.ref == \'refs/heads/master\'}}', 'steps' => [ ['uses' => 'docker/setup-buildx-action@v4'], - [ - 'name' => 'Login to ghcr.io', - 'uses' => 'docker/login-action@v4', - 'with' => [ - 'registry' => 'ghcr.io', - 'username' => '${{ github.actor }}', - 'password' => '${{ secrets.GITHUB_TOKEN }}', - ], - ], + $this->loginGhcrStep(), [ 'name' => 'Login to hub.docker.com', 'uses' => 'docker/login-action@v4', @@ -267,8 +269,7 @@ public function getJobsDescription(array $node): array ' ' . implode(" \\\n ", [ 'docker buildx imagetools create', ...$pushTags, - '"ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-amd64-' . $node['tag'] . '"', - '"ghcr.io/webdevops/' . $node['image'] . ':sha-${{ github.sha }}-arm64-' . $node['tag'] . '" && exit 0', + ...$archImages, ]), ' sleep $((i*i))', 'done', @@ -324,11 +325,29 @@ private function buildPushWith(array $node): array /** * The image of one architecture that the job of webdevops/$image:$tag builds and, on master, pushes to ghcr.io, - * e.g. "ghcr.io/webdevops/php:sha--amd64-8.4". + * e.g. "ghcr.io/webdevops/php:sha--amd64-8.4"; by default the architecture of the matrix job. */ - private function archImage(string $image, string $tag): string + private function archImage(string $image, string $tag, string $arch = '${{ matrix.arch }}'): string { - return 'ghcr.io/webdevops/' . $image . ':sha-${{ github.sha }}-${{ matrix.arch }}-' . $tag; + return 'ghcr.io/webdevops/' . $image . ':sha-${{ github.sha }}-' . $arch . '-' . $tag; + } + + /** + * Logs in to ghcr.io with the token of the run, to push the images there and, on master, pull the parent images. + * + * @return array + */ + private function loginGhcrStep(): array + { + return [ + 'name' => 'Login to ghcr.io', + 'uses' => 'docker/login-action@v4', + 'with' => [ + 'registry' => 'ghcr.io', + 'username' => '${{ github.actor }}', + 'password' => '${{ secrets.GITHUB_TOKEN }}', + ], + ]; } /** From 7a98eb67f2bb01c0f418c508e06e3a59d181928a Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Mon, 16 Nov 2026 06:53:44 +0000 Subject: [PATCH 5/5] [TASK] Pull from Docker Hub without a mirror and take master's parents from there again In the week up to 2026-11-16, Docker Hub's "429 Too Many Requests" failed 5 jobs in 3 of 66 runs, all on one afternoon; PIE without a token failed more often. A mirror would also let the nightly rebuild of master take an outdated official base image, so the workflow no longer uses mirror.gcr.io, and master takes its parent images from Docker Hub again, as before this pull request. The login to ghcr.io goes back before the push. build-local.sh tests COMPOSER_AUTH with [[ ]] (SonarCloud shell:S7688), and GithubJobBuilder is back to 19 methods (php:S1448). --- .github/workflows/build.yaml | 1280 +++++++++++------------------ CONTRIBUTING.md | 5 - build-local.sh | 2 +- ci/src/GithubJobBuilder.php | 70 +- ci/tests/GithubJobBuilderTest.php | 63 +- 5 files changed, 484 insertions(+), 936 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2e9cc4ad7..30ced584f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -60,12 +60,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - name: 'Build the image test runner' uses: docker/build-push-action@v7 @@ -106,20 +101,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/base:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -143,7 +125,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/apache:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/base:alpine=docker-image://ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -173,6 +154,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/apache:alpine REFERENCE=ghcr.io/webdevops/apache:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -242,20 +231,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/base:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -279,7 +255,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/base-app:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/base:alpine=docker-image://ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -314,6 +289,14 @@ jobs: 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 + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -383,20 +366,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/base:ubuntu-22.04' if: "${{ github.ref != 'refs/heads/master' }}" @@ -420,7 +390,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/base-app:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/base:ubuntu-22.04=docker-image://ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -455,6 +424,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -552,20 +529,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/bootstrap:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -589,7 +553,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/base:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/bootstrap:alpine=docker-image://ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -624,6 +587,14 @@ jobs: 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 + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -719,20 +690,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/bootstrap:ubuntu-22.04' if: "${{ github.ref != 'refs/heads/master' }}" @@ -756,7 +714,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/base:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/bootstrap:ubuntu-22.04=docker-image://ghcr.io/webdevops/bootstrap:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -791,6 +748,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -888,20 +853,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -925,7 +877,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/bootstrap:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -960,6 +911,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1055,20 +1014,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1092,7 +1038,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/bootstrap:ubuntu-22.04-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1127,6 +1072,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1224,20 +1177,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/base-app:ubuntu-22.04' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1261,7 +1201,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/dockerfile-build-env:latest-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/base-app:ubuntu-22.04=docker-image://ghcr.io/webdevops/base-app:sha-${{ github.sha }}-${{ matrix.arch }}-ubuntu-22.04' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1291,6 +1230,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/dockerfile-build-env:latest REFERENCE=ghcr.io/webdevops/dockerfile-build-env:sha-${{ github.sha }}-${{ matrix.arch }}-latest' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1360,20 +1307,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/base:alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1397,7 +1331,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/nginx:alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/base:alpine=docker-image://ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1427,6 +1360,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/nginx:alpine REFERENCE=ghcr.io/webdevops/nginx:sha-${{ github.sha }}-${{ matrix.arch }}-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1496,20 +1437,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1533,7 +1461,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-apache:8.2=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1563,6 +1490,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.2 REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1596,20 +1531,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1633,7 +1555,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-apache:8.2-alpine=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1663,6 +1584,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.2-alpine REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1768,20 +1697,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1805,7 +1721,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-apache:8.3=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1835,6 +1750,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.3 REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -1868,20 +1791,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1905,7 +1815,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-apache:8.3-alpine=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -1935,6 +1844,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.3-alpine REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2040,20 +1957,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2077,7 +1981,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-apache:8.4=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2107,6 +2010,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.4 REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2140,20 +2051,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2177,7 +2075,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-apache:8.4-alpine=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2207,6 +2104,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.4-alpine REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2312,20 +2217,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2349,7 +2241,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-apache:8.5=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2379,6 +2270,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.5 REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2412,20 +2311,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-apache:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2449,7 +2335,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-apache:8.5-alpine=docker-image://ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2479,6 +2364,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache-dev:8.5-alpine REFERENCE=ghcr.io/webdevops/php-apache-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2584,20 +2477,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2621,7 +2501,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.2=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2651,6 +2530,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.2 REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2710,20 +2597,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2747,7 +2621,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.2-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2777,6 +2650,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.2-alpine REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -2908,20 +2789,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2945,7 +2813,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.3=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -2975,6 +2842,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.3 REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3034,20 +2909,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3071,7 +2933,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.3-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3101,6 +2962,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.3-alpine REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3232,20 +3101,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3269,7 +3125,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.4=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3299,6 +3154,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.4 REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3358,20 +3221,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3395,7 +3245,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.4-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3425,6 +3274,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.4-alpine REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3556,20 +3413,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3593,7 +3437,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.5=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3623,6 +3466,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.5 REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3682,20 +3533,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3719,7 +3557,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-apache:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.5-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3749,6 +3586,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-apache:8.5-alpine REFERENCE=ghcr.io/webdevops/php-apache:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3880,20 +3725,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3917,7 +3749,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.2=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -3952,6 +3783,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -3985,20 +3824,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4022,7 +3848,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.2-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4057,6 +3882,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4162,20 +3995,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4199,7 +4019,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.3=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4234,6 +4053,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4267,20 +4094,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4304,7 +4118,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.3-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4339,6 +4152,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4444,20 +4265,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4481,7 +4289,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.4=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4516,6 +4323,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4549,20 +4364,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4586,7 +4388,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.4-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4621,6 +4422,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4726,20 +4535,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4763,7 +4559,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.5=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4798,6 +4593,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -4831,20 +4634,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4868,7 +4658,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.5-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -4903,6 +4692,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5008,20 +4805,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5045,7 +4829,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-nginx:8.2=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5075,6 +4858,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.2 REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5108,20 +4899,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5145,7 +4923,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-nginx:8.2-alpine=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5175,6 +4952,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.2-alpine REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5280,20 +5065,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5317,7 +5089,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-nginx:8.3=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5347,6 +5118,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.3 REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5380,20 +5159,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5417,7 +5183,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-nginx:8.3-alpine=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5447,6 +5212,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.3-alpine REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5552,20 +5325,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5589,7 +5349,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-nginx:8.4=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5619,6 +5378,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.4 REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5652,20 +5419,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5689,7 +5443,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-nginx:8.4-alpine=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5719,6 +5472,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.4-alpine REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5824,20 +5585,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5861,7 +5609,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-nginx:8.5=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5891,6 +5638,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.5 REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -5924,20 +5679,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php-nginx:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5961,7 +5703,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx-dev:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php-nginx:8.5-alpine=docker-image://ghcr.io/webdevops/php-nginx:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -5991,6 +5732,14 @@ jobs: - name: 'run image tests' run: 'make test-image-run IMAGE=webdevops/php-nginx-dev:8.5-alpine REFERENCE=ghcr.io/webdevops/php-nginx-dev:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6096,20 +5845,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6133,7 +5869,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.2=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6168,6 +5903,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6227,20 +5970,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.2-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6264,7 +5994,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.2-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.2-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6299,6 +6028,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6430,20 +6167,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6467,7 +6191,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.3=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6502,6 +6225,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6561,20 +6292,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.3-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6598,7 +6316,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.3-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.3-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6633,6 +6350,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6764,20 +6489,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6801,7 +6513,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.4=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6836,6 +6547,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -6895,20 +6614,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.4-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6932,7 +6638,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.4-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.4-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -6967,6 +6672,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7098,20 +6811,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7135,7 +6835,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.5=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7170,6 +6869,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7229,20 +6936,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/php:8.5-alpine' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7266,7 +6960,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php-nginx:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/php:8.5-alpine=docker-image://ghcr.io/webdevops/php:sha-${{ github.sha }}-${{ matrix.arch }}-8.5-alpine' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7301,6 +6994,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7432,20 +7133,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7469,7 +7157,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.2-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7504,6 +7191,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7563,20 +7258,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7600,7 +7282,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.2-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7635,6 +7316,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7770,20 +7459,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7807,7 +7483,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.3-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7842,6 +7517,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -7901,20 +7584,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7938,7 +7608,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.3-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -7973,6 +7642,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -8108,20 +7785,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8145,7 +7809,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.4-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8180,6 +7843,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -8239,20 +7910,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8276,7 +7934,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.4-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8311,6 +7968,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -8446,20 +8111,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8483,7 +8135,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.5-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8518,6 +8169,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -8577,20 +8236,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Download parent image (OCI layout): webdevops/toolbox:latest' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8614,7 +8260,6 @@ jobs: cache-to: 'type=gha,scope=webdevops/php:8.5-alpine-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH - build-contexts: 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest' - name: 'Build (load locally, from parent artifact)' if: "${{ github.ref != 'refs/heads/master' }}" @@ -8649,6 +8294,14 @@ jobs: 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@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" @@ -8782,20 +8435,7 @@ jobs: with: persist-credentials: false - - name: 'Set up Buildx (Docker Hub through mirror.gcr.io)' uses: docker/setup-buildx-action@v4 - with: - buildkitd-config-inline: |- - [registry."docker.io"] - mirrors = ["mirror.gcr.io"] - - - if: "${{github.ref == 'refs/heads/master'}}" - name: 'Login to ghcr.io' - uses: docker/login-action@v4 - with: - registry: ghcr.io - username: '${{ github.actor }}' - password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Build (load locally)' uses: docker/build-push-action@v7 @@ -8811,6 +8451,14 @@ jobs: cache-to: 'type=gha,scope=webdevops/toolbox:latest-${{ matrix.arch }},mode=max' build-args: 'TARGETARCH=${{ matrix.arch }}' secret-envs: COMPOSER_AUTH=COMPOSER_AUTH + - + if: "${{github.ref == 'refs/heads/master'}}" + name: 'Login to ghcr.io' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: '${{ github.actor }}' + password: '${{ secrets.GITHUB_TOKEN }}' - name: 'Push arch image' if: "${{github.ref == 'refs/heads/master'}}" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7f14215e8..efd2d5e6d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,11 +58,6 @@ internally; pull the images from Docker Hub. The build steps pass the token of the run (`GITHUB_TOKEN`) to Docker as the build secret `COMPOSER_AUTH`, for PIE (see [PHP extension builds](#php-extension-builds)). The token may only read the repository; only the jobs that push images to ghcr.io may also write packages there. -BuildKit pulls the images from Docker Hub through `mirror.gcr.io`: anonymous pulls from Docker Hub fail with `429 Too Many Requests` once the IP address of the runner has reached its limit. -An image that the mirror does not have comes from Docker Hub. -The webdevops parent images never come from Docker Hub, where the mirror could serve an outdated one: in pull requests and on other branches they come from the artifacts of the run, on master from the image that the job of the parent pushed to ghcr.io in the same run (`ghcr.io/webdevops/:sha---`). -So only official images like `php` and `composer` go through the mirror. - ## Building and testing locally Build a single image from its directory. Its parent image (the `FROM` line) and `webdevops/toolbox` are taken from your local images or pulled from Docker Hub: diff --git a/build-local.sh b/build-local.sh index bab88eb7e..61653fc1d 100755 --- a/build-local.sh +++ b/build-local.sh @@ -17,7 +17,7 @@ fi # PIE takes a GitHub token from COMPOSER_AUTH, see "PHP extension builds" in CONTRIBUTING.md SECRET="" -if [ -n "${COMPOSER_AUTH:-}" ]; then +if [[ -n "${COMPOSER_AUTH:-}" ]]; then SECRET="--secret id=COMPOSER_AUTH,env=COMPOSER_AUTH" fi diff --git a/ci/src/GithubJobBuilder.php b/ci/src/GithubJobBuilder.php index cefa5b5f4..5b7a0f142 100644 --- a/ci/src/GithubJobBuilder.php +++ b/ci/src/GithubJobBuilder.php @@ -49,21 +49,11 @@ class GithubJobBuilder /** * The workflow gives the token only read access to the repository; the image jobs may also push their images to - * ghcr.io and pull their parent images from there. The token gets no other permission, because the build steps - * hand it to every script of the RUN instructions with PIE (COMPOSER_AUTH_ENV). + * ghcr.io. The token gets no other permission, because the build steps hand it to every script of the RUN + * instructions with PIE (COMPOSER_AUTH_ENV). */ private const array PUSH_PERMISSIONS = ['contents' => 'read', 'packages' => 'write']; - /** - * BuildKit pulls Docker Hub images through this mirror: anonymous pulls from Docker Hub fail with "429 Too Many - * Requests" once the runner's IP address has reached its limit. The webdevops parent images never come from Docker - * Hub, where the mirror could serve an outdated one: outside of master they come from the artifacts of the run - * (buildContexts()), on master from ghcr.io (ghcrBuildContexts()). So only official images like php and composer - * go through the mirror, where an older copy does no harm. BuildKit falls back to Docker Hub for an image that the - * mirror does not have. - */ - private const string DOCKER_HUB_MIRROR = 'mirror.gcr.io'; - /** * Every image is built for these platforms. The README banner lists them too. */ @@ -147,22 +137,14 @@ public function getJobsDescription(array $node): array 'uses' => 'actions/checkout@v7', 'with' => ['persist-credentials' => false], ], - $this->setupBuildxStep(), - [ - // Before the build, which takes the parent images from ghcr.io on master - 'if' => '${{github.ref == \'refs/heads/master\'}}', - ...$this->loginGhcrStep(), - ], + ['uses' => 'docker/setup-buildx-action@v4'], ...$this->downloadParentImageSteps($imageDependencies), array_filter([ 'name' => 'Build (load locally)', 'if' => $hasImageDependencies ? '${{ github.ref == \'refs/heads/master\' }}' : null, 'uses' => 'docker/build-push-action@v7', 'env' => self::COMPOSER_AUTH_ENV, - 'with' => array_merge( - $this->buildPushWith($node), - $hasImageDependencies ? ['build-contexts' => $this->ghcrBuildContexts($imageDependencies)] : [], - ), + 'with' => $this->buildPushWith($node), ], fn (array|string|null $value): bool => $value !== null), $hasImageDependencies ? [ 'name' => 'Build (load locally, from parent artifact)', @@ -193,6 +175,10 @@ public function getJobsDescription(array $node): array 'name' => 'run structure-test', 'run' => implode("\n", $structuredTests), ] : null, + [ + 'if' => '${{github.ref == \'refs/heads/master\'}}', + ...$this->loginGhcrStep(), + ], [ 'name' => 'Push arch image', 'if' => '${{github.ref == \'refs/heads/master\'}}', @@ -333,7 +319,7 @@ private function archImage(string $image, string $tag, string $arch = '${{ matri } /** - * Logs in to ghcr.io with the token of the run, to push the images there and, on master, pull the parent images. + * Logs in to ghcr.io with the token of the run, to push the images there. * * @return array */ @@ -350,22 +336,6 @@ private function loginGhcrStep(): array ]; } - /** - * Sets up Buildx with DOCKER_HUB_MIRROR for the images from Docker Hub. - * - * @return array - */ - private function setupBuildxStep(): array - { - return [ - 'name' => 'Set up Buildx (Docker Hub through ' . self::DOCKER_HUB_MIRROR . ')', - 'uses' => 'docker/setup-buildx-action@v4', - 'with' => [ - 'buildkitd-config-inline' => "[registry.\"docker.io\"]\n mirrors = [\"" . self::DOCKER_HUB_MIRROR . '"]', - ], - ]; - } - /** * @param array $node * @return array{cache-from: string, cache-to: string} @@ -484,26 +454,6 @@ private function buildContexts(array $imageDependencies): string return implode("\n", $lines); } - /** - * Buildx `build-contexts` value of master, mapping every literal FROM/COPY --from reference in $imageDependencies to - * the image that the job of that dependency pushed to ghcr.io in the same run ("Push arch image"); the dependencies - * are built before this job, as for the artifacts of buildContexts(). BuildKit thus never pulls a webdevops image - * from Docker Hub, where its mirror could serve an outdated one, and the build uses the parent image of its commit. - * - * @param array $imageDependencies - */ - private function ghcrBuildContexts(array $imageDependencies): string - { - $lines = []; - foreach ($imageDependencies as $literalRef => $imageId) { - // e.g. "webdevops/php:8.4" - [$repository, $tag] = explode(':', $imageId, 2); - $lines[] = $literalRef . '=docker-image://' . $this->archImage(substr($repository, strlen('webdevops/')), $tag); - } - - return implode("\n", $lines); - } - /** * Command of the image test step, null if the image has no tests in ci/image-tests: make test-image-run, the command * of the docs, runs the tests against the image this job built, with the runner that the step before built. @@ -563,7 +513,7 @@ public function getImageTestRunnerConfig(): array 'uses' => 'actions/checkout@v7', 'with' => ['persist-credentials' => false], ], - $this->setupBuildxStep(), + ['uses' => 'docker/setup-buildx-action@v4'], [ 'name' => 'Build the image test runner', 'uses' => 'docker/build-push-action@v7', diff --git a/ci/tests/GithubJobBuilderTest.php b/ci/tests/GithubJobBuilderTest.php index c67514f25..f97e26797 100644 --- a/ci/tests/GithubJobBuilderTest.php +++ b/ci/tests/GithubJobBuilderTest.php @@ -44,7 +44,7 @@ public function testBuildAndPublishJob(): void self::assertSame('${{ matrix.runner }}', $jobs['base_alpine']['runs-on']); self::assertSame('webdevops/dockerfile-build-env', $jobs['base_alpine']['container']); self::assertSame('base_alpine', $jobs['base_alpine_publish']['needs']); - self::assertSame(['contents' => 'read', 'packages' => 'write'], $jobs['base_alpine']['permissions'], 'pushes to and pulls from ghcr.io'); + self::assertSame(['contents' => 'read', 'packages' => 'write'], $jobs['base_alpine']['permissions'], 'pushes to ghcr.io'); self::assertSame(['packages' => 'write'], $jobs['base_alpine_publish']['permissions'], 'pushes to ghcr.io, needs no checkout'); self::assertSame('${{github.ref == \'refs/heads/master\'}}', $jobs['base_alpine_publish']['if']); } @@ -59,15 +59,9 @@ public function testJobWaitsForItsParentAndTheImageTestRunner(): void public function testImageTestRunnerIsBuiltOncePerArchitectureIntoTheCache(): void { $job = new GithubJobBuilder(self::ROOT)->getImageTestRunnerConfig(); - $steps = $this->steps(['job' => $job], 'job'); self::assertSame(['fail-fast' => false, 'matrix' => ['include' => GithubJobBuilder::PLATFORMS]], $job['strategy']); self::assertSame('${{ matrix.runner }}', $job['runs-on']); - self::assertSame([ - 'actions/checkout@v7', - 'Set up Buildx (Docker Hub through mirror.gcr.io)', - 'Build the image test runner', - ], array_keys($steps)); self::assertSame([ 'context' => '.', 'file' => 'ci/image-tests/Dockerfile', @@ -75,28 +69,8 @@ public function testImageTestRunnerIsBuiltOncePerArchitectureIntoTheCache(): voi 'outputs' => 'type=cacheonly', 'cache-from' => 'type=gha,scope=webdevops-image-tests-${{ matrix.arch }}', 'cache-to' => 'type=gha,scope=webdevops-image-tests-${{ matrix.arch }},mode=max', - ], $steps['Build the image test runner']['with']); - self::assertTrue($steps['Build the image test runner']['continue-on-error'], 'a failure must not skip the image jobs that need this job'); - } - - public function testDockerHubImagesComeThroughTheMirror(): void - { - $jobSteps = [ - 'image job' => $this->steps($this->jobs()), - 'image test runner' => $this->steps(['job' => new GithubJobBuilder(self::ROOT)->getImageTestRunnerConfig()], 'job'), - ]; - - foreach ($jobSteps as $job => $steps) { - self::assertSame( - [ - 'name' => 'Set up Buildx (Docker Hub through mirror.gcr.io)', - 'uses' => 'docker/setup-buildx-action@v4', - 'with' => ['buildkitd-config-inline' => "[registry.\"docker.io\"]\n mirrors = [\"mirror.gcr.io\"]"], - ], - $steps['Set up Buildx (Docker Hub through mirror.gcr.io)'], - $job . ': on master too, because no build takes a webdevops image from Docker Hub', - ); - } + ], $job['steps'][2]['with']); + self::assertTrue($job['steps'][2]['continue-on-error'], 'a failure must not skip the image jobs that need this job'); } public function testEveryBuildGetsTheTokenOfTheRunForPie(): void @@ -134,16 +108,15 @@ public function testImageWithoutDependenciesIsBuiltOnce(): void self::assertSame([ 'actions/checkout@v7', - 'Set up Buildx (Docker Hub through mirror.gcr.io)', - 'Login to ghcr.io', + 'docker/setup-buildx-action@v4', 'Build (load locally)', 'Build the image test runner', 'run image tests', 'run structure-test', + 'Login to ghcr.io', 'Push arch image', ], array_keys($steps)); self::assertArrayNotHasKey('if', $steps['Build (load locally)']); - self::assertArrayNotHasKey('build-contexts', $steps['Build (load locally)']['with']); self::assertSame( 'docker push "ghcr.io/webdevops/base:sha-${{ github.sha }}-${{ matrix.arch }}-alpine"', $steps['Push arch image']['run'], @@ -207,7 +180,7 @@ public function testImageWithoutTestsHasNoTestSteps(): void self::assertArrayNotHasKey('run structure-test', $steps); } - public function testBuildsUseTheParentImagesOfThisRun(): void + public function testBranchBuildUsesTheParentImagesOfThisRun(): void { $steps = $this->steps($this->jobs([ 'imageParent' => 'webdevops/base:ubuntu-22.04', @@ -217,8 +190,7 @@ public function testBuildsUseTheParentImagesOfThisRun(): void self::assertSame([ 'actions/checkout@v7', - 'Set up Buildx (Docker Hub through mirror.gcr.io)', - 'Login to ghcr.io', + 'docker/setup-buildx-action@v4', 'Download parent image (OCI layout): webdevops/base:ubuntu-22.04', 'Download parent image (OCI layout): webdevops/toolbox:latest', 'Build (load locally)', @@ -226,6 +198,7 @@ public function testBuildsUseTheParentImagesOfThisRun(): void 'Build the image test runner', 'run image tests', 'run structure-test', + 'Login to ghcr.io', 'Push arch image', ], array_keys($steps)); self::assertSame( @@ -234,12 +207,7 @@ public function testBuildsUseTheParentImagesOfThisRun(): void ); self::assertSame('${{ github.ref != \'refs/heads/master\' }}', $steps['Download parent image (OCI layout): webdevops/base:ubuntu-22.04']['if']); self::assertSame('${{ github.ref == \'refs/heads/master\' }}', $steps['Build (load locally)']['if']); - self::assertSame( - "webdevops/base:latest=docker-image://ghcr.io/webdevops/base:sha-\${{ github.sha }}-\${{ matrix.arch }}-ubuntu-22.04\n" - . 'webdevops/toolbox=docker-image://ghcr.io/webdevops/toolbox:sha-${{ github.sha }}-${{ matrix.arch }}-latest', - $steps['Build (load locally)']['with']['build-contexts'], - 'master takes the parent images that their jobs pushed to ghcr.io in the same run', - ); + self::assertArrayNotHasKey('build-contexts', $steps['Build (load locally)']['with']); self::assertSame('${{ github.ref != \'refs/heads/master\' }}', $steps['Build (load locally, from parent artifact)']['if']); self::assertSame( "webdevops/base:latest=oci-layout://.ci-oci-image/base_ubuntu-22-04:ci-parent-image\n" @@ -248,19 +216,6 @@ public function testBuildsUseTheParentImagesOfThisRun(): void ); } - public function testMasterTakesTheImageThatTheJobOfTheParentPushes(): void - { - $parent = $this->steps( - $this->jobs(['id' => 'webdevops/base:ubuntu-22.04', 'name' => 'webdevops/base:ubuntu-22.04', 'tag' => 'ubuntu-22.04']), - 'base_ubuntu-22-04', - ); - $child = $this->steps($this->jobs(['imageParent' => 'webdevops/base:ubuntu-22.04', 'imageParentRef' => 'webdevops/base:latest'])); - - $pushed = $parent['Build (load locally)']['with']['tags']; - self::assertSame('docker push "' . $pushed . '"', $parent['Push arch image']['run']); - self::assertSame('webdevops/base:latest=docker-image://' . $pushed, $child['Build (load locally)']['with']['build-contexts']); - } - public function testParentThatIsAlsoCopiedFromIsDownloadedOnce(): void { $steps = $this->steps($this->jobs([