From 1565757d4e453e4b96222b0ce4783c74d1123a8f Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 17 Mar 2023 11:55:19 -0500 Subject: [PATCH 01/14] updates the action version for all actions in all workflows --- .github/workflows/build.yaml | 33 ++++++++++++++++++------------- .github/workflows/test-build.yaml | 21 ++++++++++++-------- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fd358b7..ca44591 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,20 +17,25 @@ jobs: runs-on: ubuntu-latest if: ${{ github.ref == 'refs/heads/trunk' }} steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.ref }} + - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Github Packages - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} @@ -66,18 +71,18 @@ jobs: if: ${{ github.ref == 'refs/heads/trunk' }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.ref }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -87,7 +92,7 @@ jobs: echo "REMI_PHP_VERSION=$(echo '${{ matrix.version }}' | sed 's/\.//g')" >> $GITHUB_ENV - name: Build and push CentOS based Docker images - uses: docker/build-push-action@v2.4.0 + uses: docker/build-push-action@v4 with: push: true context: centos7 @@ -105,24 +110,24 @@ jobs: if: ${{ github.ref == 'refs/heads/trunk' }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.ref }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push CentOS based Docker images - uses: docker/build-push-action@v2.4.0 + uses: docker/build-push-action@v4 with: push: true context: centos8 diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index d267e8b..c8bde36 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -14,6 +14,11 @@ jobs: name: Build runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.ref }} + - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -49,22 +54,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.ref }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Fixup the PHP version so remi understands it run: | echo "REMI_PHP_VERSION=$(echo '${{ matrix.version }}' | sed 's/\.//g')" >> $GITHUB_ENV - name: Build and push CentOS based Docker images - uses: docker/build-push-action@v2.4.0 + uses: docker/build-push-action@v4 with: push: false context: centos7 @@ -81,18 +86,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.ref }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Build and push CentOS based Docker images - uses: docker/build-push-action@v2.4.0 + uses: docker/build-push-action@v4 with: push: false context: centos8 From e3675332074cff42d055ca59347d0ccdc3ff1ee3 Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 14:55:17 -0500 Subject: [PATCH 02/14] attempt to build ubuntu jammy and noble images --- .github/workflows/build.yaml | 7 +++---- .github/workflows/test-build.yaml | 6 +++--- Dockerfile | 11 +++++++---- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b957005..72f0436 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,10 +12,10 @@ jobs: strategy: matrix: version: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + ubuntu-release-name: ['jammy', 'noble'] environment: name: Build runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/trunk' }} steps: - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -41,7 +41,7 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu + type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} images: | ${{ secrets.IMAGE_NAME }} ghcr.io/${{ github.repository }} @@ -51,7 +51,7 @@ jobs: with: push: true platforms: linux/amd64,linux/arm64 - build-args: PHP_VERSION=${{ matrix.version }} + build-args: PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -63,7 +63,6 @@ jobs: environment: name: Build runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/trunk' }} steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 1561786..388548a 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -1,4 +1,4 @@ -name: Build Images +name: Build Images (Testing) on: push: @@ -25,7 +25,7 @@ jobs: uses: docker/metadata-action@v4 with: tags: | - type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu + type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} images: | ${{ secrets.IMAGE_NAME }} ghcr.io/${{ github.repository }} @@ -35,7 +35,7 @@ jobs: with: push: false platforms: linux/amd64,linux/arm64 - build-args: PHP_VERSION=${{ matrix.version }} + build-args: PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 48302ff..c277b9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ -FROM ubuntu:22.04 +ARG UBUNTU_RELEASE_NAME=jammy +FROM ubuntu:${UBUNTU_RELEASE_NAME} ARG PHP_VERSION=8.2 +ARG UBUNTU_RELEASE_NAME=jammy SHELL ["/bin/bash", "-c"] -ENV DEBIAN_FRONTEND noninteractive +ENV DEBIAN_FRONTEND=noninteractive + RUN \ apt-get update && \ @@ -13,10 +16,10 @@ RUN \ rm -rf /var/lib/apt/lists/* RUN \ - echo "deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main" | tee /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list && \ + echo "deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ ${UBUNTU_RELEASE_NAME} main" | tee /etc/apt/sources.list.d/ondrej-ubuntu-php-${UBUNTU_RELEASE_NAME}.list && \ mkdir ~/.gnupg && chmod 0700 $_ && \ gpg --no-default-keyring --keyring /usr/share/keyrings/ondrej-ubuntu-php.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C && \ - sed -i 's/deb /deb \[signed\-by=\/usr\/share\/keyrings\/ondrej-ubuntu-php.gpg\] /' /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list && \ + sed -i 's/deb /deb \[signed\-by=\/usr\/share\/keyrings\/ondrej-ubuntu-php.gpg\] /' /etc/apt/sources.list.d/ondrej-ubuntu-php-${UBUNTU_RELEASE_NAME}.list && \ apt-get update && \ rm -rf /var/lib/apt/lists/* From 841cb2467d2590ded12949fc86afddd844c5816b Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 14:56:33 -0500 Subject: [PATCH 03/14] attempt to build ubuntu jammy and noble images --- .github/workflows/test-build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 388548a..2fc8d70 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -10,6 +10,7 @@ jobs: strategy: matrix: version: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + ubuntu-release-name: ['jammy', 'noble'] environment: name: Build runs-on: ubuntu-latest From 7da1eb0011e34b8d4e6025d89e9e7d0c598e7271 Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 15:04:37 -0500 Subject: [PATCH 04/14] maybe try a different format here --- .github/workflows/test-build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 2fc8d70..cb5589d 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -36,7 +36,9 @@ jobs: with: push: false platforms: linux/amd64,linux/arm64 - build-args: PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} + build-args: | + PHP_VERSION=${{ matrix.version }} + UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 6f6d7a8b78a7a9db29ecc3ccc1257b71b001ffdf Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 15:14:35 -0500 Subject: [PATCH 05/14] conditionally tag the images for 22.04 as -ubuntu and jammy, all credit to chatgpt --- .github/workflows/test-build.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index cb5589d..40e9aa3 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -27,10 +27,20 @@ jobs: with: tags: | type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} + type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu images: | ${{ secrets.IMAGE_NAME }} ghcr.io/${{ github.repository }} + - name: Set tags + id: set-tags + run: | + if [[ "${{ matrix.ubuntu-release-name }}" == "jammy" ]]; then + echo "tags=${{ steps.meta.outputs.tags }} ${{ matrix.version }}-ubuntu" >> $GITHUB_ENV + else + echo "tags=${{ steps.meta.outputs.tags }}" >> $GITHUB_ENV + fi + - name: Build and push Docker images uses: docker/build-push-action@v4 with: @@ -39,7 +49,7 @@ jobs: build-args: | PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ env.tags }} labels: ${{ steps.meta.outputs.labels }} From 4d05df15320b9aebbd0c24d79b49b8dd0685a7db Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 15:18:28 -0500 Subject: [PATCH 06/14] maybe properly format the tags --- .github/workflows/test-build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 40e9aa3..5865941 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -36,9 +36,9 @@ jobs: id: set-tags run: | if [[ "${{ matrix.ubuntu-release-name }}" == "jammy" ]]; then - echo "tags=${{ steps.meta.outputs.tags }} ${{ matrix.version }}-ubuntu" >> $GITHUB_ENV + echo "TAGS=${{ steps.meta.outputs.tags }},${{ matrix.version }}-ubuntu" >> $GITHUB_ENV else - echo "tags=${{ steps.meta.outputs.tags }}" >> $GITHUB_ENV + echo "TAGS=${{ steps.meta.outputs.tags }}" >> $GITHUB_ENV fi - name: Build and push Docker images From 71dd52152f5c48578d3c1597c6aa24abde1d8a51 Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 16:04:58 -0500 Subject: [PATCH 07/14] alternative method --- .github/workflows/test-build.yaml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 5865941..fae7836 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -21,25 +21,28 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Extract metadata (tags, labels) for Docker + - name: Extract metadata (tags, labels) for Docker (Jammy) + if: matrix.ubuntu-release-name == 'jammy' id: meta uses: docker/metadata-action@v4 with: tags: | - type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} - type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu + type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} + type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu images: | ${{ secrets.IMAGE_NAME }} ghcr.io/${{ github.repository }} - - name: Set tags - id: set-tags - run: | - if [[ "${{ matrix.ubuntu-release-name }}" == "jammy" ]]; then - echo "TAGS=${{ steps.meta.outputs.tags }},${{ matrix.version }}-ubuntu" >> $GITHUB_ENV - else - echo "TAGS=${{ steps.meta.outputs.tags }}" >> $GITHUB_ENV - fi + - name: Extract metadata (tags, labels) for Docker (Others) + if: matrix.ubuntu-release-name != 'jammy' + id: meta + uses: docker/metadata-action@v4 + with: + tags: | + type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} + images: | + ${{ secrets.IMAGE_NAME }} + ghcr.io/${{ github.repository }} - name: Build and push Docker images uses: docker/build-push-action@v4 From 8133c25878d93de8b78af048dcbea4ee41db6abd Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 16:25:28 -0500 Subject: [PATCH 08/14] a bit more elaborate --- .github/workflows/test-build.yaml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index fae7836..2e4d829 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -23,7 +23,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker (Jammy) if: matrix.ubuntu-release-name == 'jammy' - id: meta + id: meta-jammy uses: docker/metadata-action@v4 with: tags: | @@ -35,7 +35,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker (Others) if: matrix.ubuntu-release-name != 'jammy' - id: meta + id: meta-others uses: docker/metadata-action@v4 with: tags: | @@ -44,15 +44,24 @@ jobs: ${{ secrets.IMAGE_NAME }} ghcr.io/${{ github.repository }} - - name: Build and push Docker images + - name: Build and push Docker images (Jammy) + if: matrix.ubuntu-release-name == 'jammy' uses: docker/build-push-action@v4 with: - push: false + push: true + platforms: linux/amd64,linux/arm64 + build-args: PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Build and push Docker images (Others) + if: matrix.ubuntu-release-name != 'jammy' + uses: docker/build-push-action@v4 + with: + push: true platforms: linux/amd64,linux/arm64 - build-args: | - PHP_VERSION=${{ matrix.version }} - UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} - tags: ${{ env.tags }} + build-args: PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 0215a81fc783e47952d049308dc16fb9d8969ca7 Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 16:26:22 -0500 Subject: [PATCH 09/14] fix typo --- .github/workflows/test-build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 2e4d829..ea1db24 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -51,8 +51,8 @@ jobs: push: true platforms: linux/amd64,linux/arm64 build-args: PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta-jammy.outputs.tags }} + labels: ${{ steps.meta-jammy.outputs.labels }} - name: Build and push Docker images (Others) if: matrix.ubuntu-release-name != 'jammy' @@ -61,8 +61,8 @@ jobs: push: true platforms: linux/amd64,linux/arm64 build-args: PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta-others.outputs.tags }} + labels: ${{ steps.meta-others.outputs.labels }} Build_PHP_CentOS8_Test: From 1a1aca9700662d614910247040f64dc41086dc2a Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 16:27:56 -0500 Subject: [PATCH 10/14] bring back what we learned earlier --- .github/workflows/test-build.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index ea1db24..c411c07 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -50,7 +50,9 @@ jobs: with: push: true platforms: linux/amd64,linux/arm64 - build-args: PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} + build-args: | + PHP_VERSION=${{ matrix.version }} + UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} tags: ${{ steps.meta-jammy.outputs.tags }} labels: ${{ steps.meta-jammy.outputs.labels }} @@ -60,7 +62,9 @@ jobs: with: push: true platforms: linux/amd64,linux/arm64 - build-args: PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} + build-args: | + PHP_VERSION=${{ matrix.version }} + UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} tags: ${{ steps.meta-others.outputs.tags }} labels: ${{ steps.meta-others.outputs.labels }} From ed338e08825629ba1c7067ee0570990abb8786de Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 16:28:30 -0500 Subject: [PATCH 11/14] make push false --- .github/workflows/test-build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index c411c07..f197085 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -48,7 +48,7 @@ jobs: if: matrix.ubuntu-release-name == 'jammy' uses: docker/build-push-action@v4 with: - push: true + push: false platforms: linux/amd64,linux/arm64 build-args: | PHP_VERSION=${{ matrix.version }} @@ -60,7 +60,7 @@ jobs: if: matrix.ubuntu-release-name != 'jammy' uses: docker/build-push-action@v4 with: - push: true + push: false platforms: linux/amd64,linux/arm64 build-args: | PHP_VERSION=${{ matrix.version }} From 36c9debda1a11abd835adc8a172850745f0e8713 Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 19:16:13 -0500 Subject: [PATCH 12/14] further upgrade actions --- .github/workflows/test-build.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 9aedc3e..0195c63 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -16,20 +16,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Extract metadata (tags, labels) for Docker (Jammy) if: matrix.ubuntu-release-name == 'jammy' id: meta-jammy - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: tags: | type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} @@ -41,7 +41,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker (Others) if: matrix.ubuntu-release-name != 'jammy' id: meta-others - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: tags: | type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} @@ -51,7 +51,7 @@ jobs: - name: Build and push Docker images (Jammy) if: matrix.ubuntu-release-name == 'jammy' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: false platforms: linux/amd64,linux/arm64 @@ -63,7 +63,7 @@ jobs: - name: Build and push Docker images (Others) if: matrix.ubuntu-release-name != 'jammy' - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: false platforms: linux/amd64,linux/arm64 @@ -83,18 +83,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build and push CentOS based Docker images - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: false context: centos8 From a25249ada602074f39b1f5bd9e5c3e33c2a90a08 Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 19:29:54 -0500 Subject: [PATCH 13/14] updates README --- README.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2ee49e0..4563909 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Base PHP -This image is the parent for a number of downstream images that make use of PHP either as a commandline tool or for php-fpm. The images are created from a number of base operating systems including CentOS 7, Rocky Linux 8 and Ubuntu. The non-Ubuntu based images are now deprecated and will be replaced with Ubuntu based images over time. This image is meant to be minimal and aims to support the needs of a WordPress ecosystem. The images are offered in both x86_64 and arm64 architectures. +This image is the parent for a number of downstream images that make use of PHP either as a commandline tool or for php-fpm. The images are created from a number of base operating systems including CentOS 7, Rocky Linux 8 and Ubuntu 22.04 and 24.04. The non-Ubuntu based images are now deprecated and will be replaced with Ubuntu based images over time. This image is meant to be minimal and aims to support the needs of a WordPress ecosystem. The images are offered in both x86_64 and arm64 architectures. ## Usage @@ -8,7 +8,7 @@ This image, by itself, is not particularly useful. When run it passes arguments ## Building -There are currently a number of images being built for the different operating systems. This image is built with support for PHP 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1 and 8.2. Note that we do not build CentOS/Rocky Linux based images beyond 8.0 and they will be removed in the future. +There are currently a number of images being built for the different operating systems. This image is built with support for PHP 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2 and 8.3. Note that we do not build CentOS/Rocky Linux based images beyond 8.1 and they will be removed in the future. Also note that CentOS/RL based images are not being pushed to ghcr.io! @@ -23,6 +23,7 @@ Images are available under the tags: * 10up/base-php:7.3 (Deprecated) * 10up/base-php:7.4 (Deprecated) * 10up/base-php:8.0 (Deprecated) + * 10up/base-php:8.1 (Deprecated) * Ubuntu 22.04 based (Docker Hub) * 10up/base-php:7.0-ubuntu * 10up/base-php:7.1-ubuntu @@ -32,6 +33,7 @@ Images are available under the tags: * 10up/base-php:8.0-ubuntu * 10up/base-php:8.1-ubuntu * 10up/base-php:8.2-ubuntu + * 10up/base-php:8.3-ubuntu * Ubuntu 22.04 based (Github Packages) * ghcr.io/10up/base-php:7.0-ubuntu * ghcr.io/10up/base-php:7.1-ubuntu @@ -41,6 +43,27 @@ Images are available under the tags: * ghcr.io/10up/base-php:8.0-ubuntu * ghcr.io/10up/base-php:8.1-ubuntu * ghcr.io/10up/base-php:8.2-ubuntu + * ghcr.io/10up/base-php:8.3-ubuntu +* Ubuntu 24.04 based (Docker Hub) + * 10up/base-php:7.0-noble + * 10up/base-php:7.1-noble + * 10up/base-php:7.2-noble + * 10up/base-php:7.3-noble + * 10up/base-php:7.4-noble + * 10up/base-php:8.0-noble + * 10up/base-php:8.1-noble + * 10up/base-php:8.2-noble + * 10up/base-php:8.3-noble +* Ubuntu 24.04 based (Github Packages) + * ghcr.io/10up/base-php:7.0-noble + * ghcr.io/10up/base-php:7.1-noble + * ghcr.io/10up/base-php:7.2-noble + * ghcr.io/10up/base-php:7.3-noble + * ghcr.io/10up/base-php:7.4-noble + * ghcr.io/10up/base-php:8.0-noble + * ghcr.io/10up/base-php:8.1-noble + * ghcr.io/10up/base-php:8.2-noble + * ghcr.io/10up/base-php:8.3-noble ## Support Level From 3113bde6a11f72d1e17d979ef72eaf4ac2e61a01 Mon Sep 17 00:00:00 2001 From: Dustin Rue Date: Fri, 2 Aug 2024 19:34:18 -0500 Subject: [PATCH 14/14] make changes live in the build workflow --- .github/workflows/build.yaml | 66 +++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dc5f0de..650a19d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -18,47 +18,75 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Github Packages - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 + - name: Extract metadata (tags, labels) for Docker (Jammy) + if: matrix.ubuntu-release-name == 'jammy' + id: meta-jammy + uses: docker/metadata-action@v5 with: tags: | - type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} + type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} + type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu images: | ${{ secrets.IMAGE_NAME }} ghcr.io/${{ github.repository }} - - name: Build and push Docker images - uses: docker/build-push-action@v4 + - name: Extract metadata (tags, labels) for Docker (Others) + if: matrix.ubuntu-release-name != 'jammy' + id: meta-others + uses: docker/metadata-action@v5 + with: + tags: | + type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }} + images: | + ${{ secrets.IMAGE_NAME }} + ghcr.io/${{ github.repository }} + + - name: Build and push Docker images (Jammy) + if: matrix.ubuntu-release-name == 'jammy' + uses: docker/build-push-action@v6 + with: + push: true + platforms: linux/amd64,linux/arm64 + build-args: | + PHP_VERSION=${{ matrix.version }} + UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} + tags: ${{ steps.meta-jammy.outputs.tags }} + labels: ${{ steps.meta-jammy.outputs.labels }} + + - name: Build and push Docker images (Others) + if: matrix.ubuntu-release-name != 'jammy' + uses: docker/build-push-action@v6 with: push: true platforms: linux/amd64,linux/arm64 - build-args: PHP_VERSION=${{ matrix.version }} UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + build-args: | + PHP_VERSION=${{ matrix.version }} + UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }} + tags: ${{ steps.meta-others.outputs.tags }} + labels: ${{ steps.meta-others.outputs.labels }} Build_PHP_CentOS8: @@ -70,24 +98,24 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.ref }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push CentOS based Docker images - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: true context: centos8