diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 918ab4ecf..30ced584f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,6 +10,8 @@ name: build branches: - master workflow_dispatch: null +permissions: + contents: read jobs: validate-automation: name: 'Validate Automation' @@ -89,6 +91,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -108,6 +113,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 +124,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 +140,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' @@ -154,10 +165,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: @@ -208,6 +221,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -227,6 +243,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 +254,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 +270,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' @@ -278,10 +300,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: @@ -332,6 +356,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -351,6 +378,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 +389,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 +405,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' @@ -402,17 +435,20 @@ 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' }}" 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' - @@ -429,6 +465,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: @@ -481,6 +519,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -500,6 +541,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 +552,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 +568,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' @@ -551,17 +598,20 @@ 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' }}" 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' - @@ -578,6 +628,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: @@ -628,6 +680,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -647,6 +702,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 +713,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 +729,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' @@ -698,17 +759,20 @@ 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' }}" 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' - @@ -725,6 +789,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: @@ -777,6 +843,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -796,6 +865,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 +876,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 +892,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' @@ -847,17 +922,20 @@ 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' }}" 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' - @@ -874,6 +952,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: @@ -924,6 +1004,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -943,6 +1026,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 +1037,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 +1053,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' @@ -994,17 +1083,20 @@ 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' }}" 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' - @@ -1021,6 +1113,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: @@ -1073,6 +1167,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1092,6 +1189,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 +1200,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 +1216,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' @@ -1138,10 +1241,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: @@ -1192,6 +1297,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1211,6 +1319,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 +1330,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 +1346,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' @@ -1257,10 +1371,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: @@ -1311,6 +1427,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1330,6 +1449,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 +1460,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 +1476,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' @@ -1376,7 +1501,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 @@ -1396,6 +1521,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1415,6 +1543,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 +1554,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 +1570,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' @@ -1461,10 +1595,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: @@ -1499,6 +1635,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: @@ -1549,6 +1687,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1568,6 +1709,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 +1720,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 +1736,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' @@ -1614,7 +1761,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 @@ -1634,6 +1781,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1653,6 +1803,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 +1814,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 +1830,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' @@ -1699,10 +1855,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: @@ -1737,6 +1895,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: @@ -1787,6 +1947,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1806,6 +1969,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 +1980,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 +1996,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' @@ -1852,7 +2021,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 @@ -1872,6 +2041,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -1891,6 +2063,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 +2074,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 +2090,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' @@ -1937,10 +2115,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: @@ -1975,6 +2155,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: @@ -2025,6 +2207,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2044,6 +2229,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 +2240,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 +2256,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' @@ -2090,7 +2281,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 @@ -2110,6 +2301,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2129,6 +2323,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 +2334,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 +2350,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' @@ -2175,10 +2375,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: @@ -2213,6 +2415,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: @@ -2263,6 +2467,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2282,6 +2489,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 +2500,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 +2516,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' @@ -2328,17 +2541,20 @@ 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' }}" 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' - @@ -2371,6 +2587,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2390,6 +2609,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 +2620,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 +2636,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' @@ -2436,17 +2661,20 @@ 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' }}" 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' - @@ -2463,6 +2691,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: @@ -2497,6 +2727,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: @@ -2547,6 +2779,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2566,6 +2801,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 +2812,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 +2828,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' @@ -2612,17 +2853,20 @@ 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' }}" 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' - @@ -2655,6 +2899,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2674,6 +2921,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 +2932,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 +2948,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' @@ -2720,17 +2973,20 @@ 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' }}" 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' - @@ -2747,6 +3003,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: @@ -2781,6 +3039,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: @@ -2831,6 +3091,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2850,6 +3113,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 +3124,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 +3140,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' @@ -2896,17 +3165,20 @@ 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' }}" 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' - @@ -2939,6 +3211,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -2958,6 +3233,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 +3244,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 +3260,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' @@ -3004,17 +3285,20 @@ 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' }}" 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' - @@ -3031,6 +3315,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: @@ -3065,6 +3351,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: @@ -3115,6 +3403,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3134,6 +3425,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 +3436,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 +3452,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' @@ -3180,17 +3477,20 @@ 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' }}" 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' - @@ -3223,6 +3523,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3242,6 +3545,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 +3556,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 +3572,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' @@ -3288,17 +3597,20 @@ 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' }}" 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' - @@ -3315,6 +3627,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: @@ -3349,6 +3663,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: @@ -3399,6 +3715,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3418,6 +3737,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 +3748,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 +3764,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' @@ -3469,7 +3794,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 @@ -3489,6 +3814,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3508,6 +3836,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 +3847,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 +3863,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' @@ -3559,10 +3893,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: @@ -3597,6 +3933,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: @@ -3647,6 +3985,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3666,6 +4007,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 +4018,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 +4034,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' @@ -3717,7 +4064,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 @@ -3737,6 +4084,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3756,6 +4106,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 +4117,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 +4133,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' @@ -3807,10 +4163,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: @@ -3845,6 +4203,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: @@ -3895,6 +4255,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -3914,6 +4277,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 +4288,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 +4304,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' @@ -3965,7 +4334,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 @@ -3985,6 +4354,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4004,6 +4376,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 +4387,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 +4403,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' @@ -4055,10 +4433,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: @@ -4093,6 +4473,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: @@ -4143,6 +4525,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4162,6 +4547,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 +4558,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 +4574,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' @@ -4213,7 +4604,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 @@ -4233,6 +4624,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4252,6 +4646,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 +4657,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 +4673,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' @@ -4303,10 +4703,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: @@ -4341,6 +4743,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: @@ -4391,6 +4795,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4410,6 +4817,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 +4828,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 +4844,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' @@ -4456,7 +4869,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 @@ -4476,6 +4889,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4495,6 +4911,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 +4922,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 +4938,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' @@ -4541,10 +4963,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: @@ -4579,6 +5003,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: @@ -4629,6 +5055,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4648,6 +5077,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 +5088,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 +5104,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' @@ -4694,7 +5129,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 @@ -4714,6 +5149,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4733,6 +5171,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 +5182,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 +5198,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' @@ -4779,10 +5223,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: @@ -4817,6 +5263,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: @@ -4867,6 +5315,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4886,6 +5337,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 +5348,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 +5364,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' @@ -4932,7 +5389,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 @@ -4952,6 +5409,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -4971,6 +5431,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 +5442,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 +5458,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' @@ -5017,10 +5483,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: @@ -5055,6 +5523,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: @@ -5105,6 +5575,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5124,6 +5597,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 +5608,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 +5624,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' @@ -5170,7 +5649,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 @@ -5190,6 +5669,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5209,6 +5691,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 +5702,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 +5718,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' @@ -5255,10 +5743,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: @@ -5293,6 +5783,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: @@ -5343,6 +5835,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5362,6 +5857,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 +5868,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 +5884,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' @@ -5413,17 +5914,20 @@ 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' }}" 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' - @@ -5456,6 +5960,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5475,6 +5982,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 +5993,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 +6009,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' @@ -5526,17 +6039,20 @@ 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' }}" 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' - @@ -5553,6 +6069,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: @@ -5587,6 +6105,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: @@ -5637,6 +6157,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5656,6 +6179,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 +6190,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 +6206,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' @@ -5707,17 +6236,20 @@ 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' }}" 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' - @@ -5750,6 +6282,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5769,6 +6304,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 +6315,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 +6331,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' @@ -5820,17 +6361,20 @@ 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' }}" 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' - @@ -5847,6 +6391,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: @@ -5881,6 +6427,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: @@ -5931,6 +6479,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -5950,6 +6501,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 +6512,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 +6528,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' @@ -6001,17 +6558,20 @@ 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' }}" 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' - @@ -6044,6 +6604,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6063,6 +6626,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 +6637,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 +6653,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' @@ -6114,17 +6683,20 @@ 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' }}" 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' - @@ -6141,6 +6713,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: @@ -6175,6 +6749,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: @@ -6225,6 +6801,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6244,6 +6823,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 +6834,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 +6850,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' @@ -6295,17 +6880,20 @@ 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' }}" 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' - @@ -6338,6 +6926,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6357,6 +6948,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 +6959,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 +6975,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' @@ -6408,17 +7005,20 @@ 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' }}" 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' - @@ -6435,6 +7035,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: @@ -6469,6 +7071,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: @@ -6519,6 +7123,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6538,6 +7145,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 +7156,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 +7172,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' @@ -6589,17 +7202,20 @@ 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' }}" 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' - @@ -6632,6 +7248,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6651,6 +7270,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 +7281,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 +7297,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' @@ -6702,17 +7327,20 @@ 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' }}" 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' - @@ -6729,6 +7357,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: @@ -6765,6 +7395,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: @@ -6817,6 +7449,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6836,6 +7471,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 +7482,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 +7498,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' @@ -6887,17 +7528,20 @@ 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' }}" 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' - @@ -6930,6 +7574,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -6949,6 +7596,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 +7607,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 +7623,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' @@ -7000,17 +7653,20 @@ 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' }}" 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' - @@ -7027,6 +7683,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: @@ -7063,6 +7721,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: @@ -7115,6 +7775,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7134,6 +7797,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 +7808,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 +7824,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' @@ -7185,17 +7854,20 @@ 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' }}" 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' - @@ -7228,6 +7900,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7247,6 +7922,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 +7933,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 +7949,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' @@ -7298,17 +7979,20 @@ 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' }}" 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' - @@ -7325,6 +8009,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: @@ -7361,6 +8047,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: @@ -7413,6 +8101,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7432,6 +8123,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 +8134,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 +8150,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' @@ -7483,17 +8180,20 @@ 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' }}" 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' - @@ -7526,6 +8226,9 @@ jobs: - image-test-runner if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7545,6 +8248,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 +8259,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 +8275,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' @@ -7596,17 +8305,20 @@ 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' }}" 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' - @@ -7623,6 +8335,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: @@ -7659,6 +8373,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: @@ -7709,6 +8425,9 @@ jobs: needs: validate-automation if: '${{ !failure() && !cancelled() }}' runs-on: '${{ matrix.runner }}' + permissions: + contents: read + packages: write container: webdevops/dockerfile-build-env steps: - @@ -7720,6 +8439,8 @@ jobs: - 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 +8450,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' @@ -7740,17 +8462,20 @@ 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' }}" 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)' @@ -7766,6 +8491,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 bbe48ab92..efd2d5e6d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,6 +55,9 @@ 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 token may only read the repository; only the jobs that push images to ghcr.io may also write packages there. + ## 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 +119,22 @@ 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 +``` + +`./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..61653fc1d 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/Commands/GenerateGithubCiCommand.php b/ci/src/Commands/GenerateGithubCiCommand.php index d4841f214..ee3618d80 100644 --- a/ci/src/Commands/GenerateGithubCiCommand.php +++ b/ci/src/Commands/GenerateGithubCiCommand.php @@ -109,6 +109,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int ], 'workflow_dispatch' => null, ], + // 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', + ], 'jobs' => $this->jobs, ]; $yamlString = Yaml::dump( diff --git a/ci/src/GithubJobBuilder.php b/ci/src/GithubJobBuilder.php index 7b04f59d5..5b7a0f142 100644 --- a/ci/src/GithubJobBuilder.php +++ b/ci/src/GithubJobBuilder.php @@ -26,6 +26,34 @@ 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. + * + * 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 }}"}}', + ]; + + 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 their images to + * 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']; + /** * Every image is built for these platforms. The README banner lists them too. */ @@ -79,6 +107,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' => [ @@ -92,6 +127,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( @@ -106,12 +143,14 @@ public function getJobsDescription(array $node): array '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)], @@ -138,23 +177,19 @@ public function getJobsDescription(array $node): array ] : 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 }}', - ], + ...$this->loginGhcrStep(), ], [ '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)', '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 +199,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 @@ -195,19 +231,12 @@ 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' => [ ['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', @@ -226,8 +255,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', @@ -270,13 +298,41 @@ 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['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), 'build-args' => implode("\n", [ 'TARGETARCH=${{ matrix.arch }}', ]), + 'secret-envs' => self::COMPOSER_AUTH_SECRET, + ]; + } + + /** + * 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"; by default the architecture of the matrix job. + */ + private function archImage(string $image, string $tag, string $arch = '${{ matrix.arch }}'): string + { + 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. + * + * @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 }}', + ], ]; } @@ -411,7 +467,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']); } /** @@ -426,9 +482,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 e01c8c20f..a0943d1bd 100644 --- a/ci/tests/Commands/GenerateGithubCiCommandTest.php +++ b/ci/tests/Commands/GenerateGithubCiCommandTest.php @@ -72,6 +72,9 @@ public function testWritesTheWorkflowWithTheValidationFirstAndTheImageJobsSorted 'pull_request' => ['branches' => ['master']], 'workflow_dispatch' => null, ], $workflow['on']); + 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 04cfd1e23..f97e26797 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 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']); } @@ -71,6 +73,22 @@ public function testImageTestRunnerIsBuiltOncePerArchitectureIntoTheCache(): voi self::assertTrue($job['steps'][2]['continue-on-error'], 'a failure must not skip the image jobs that need this 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 { $with = $this->step($this->jobs(), 'Build (load locally)')['with']; @@ -100,7 +118,7 @@ public function testImageWithoutDependenciesIsBuiltOnce(): void ], array_keys($steps)); self::assertArrayNotHasKey('if', $steps['Build (load locally)']); 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'], ); } 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() }} \