Skip to content

Commit 67a9e92

Browse files
authored
Merge pull request #17 from 10up/feature/ubuntu2404
Feature/ubuntu2404
2 parents 0bbb219 + e3e3f70 commit 67a9e92

4 files changed

Lines changed: 119 additions & 39 deletions

File tree

.github/workflows/build.yaml

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,81 @@ jobs:
1212
strategy:
1313
matrix:
1414
version: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
15+
ubuntu-release-name: ['jammy', 'noble']
1516
environment:
1617
name: Build
1718
runs-on: ubuntu-latest
1819
steps:
1920
- name: Checkout
20-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2122
with:
2223
ref: ${{ github.ref }}
2324

2425
- name: Set up QEMU
25-
uses: docker/setup-qemu-action@v2
26+
uses: docker/setup-qemu-action@v3
2627

2728
- name: Set up Docker Buildx
28-
uses: docker/setup-buildx-action@v2
29+
uses: docker/setup-buildx-action@v3
2930

3031
- name: Login to DockerHub
31-
uses: docker/login-action@v2
32+
uses: docker/login-action@v3
3233
with:
3334
username: ${{ secrets.DOCKERHUB_USERNAME }}
3435
password: ${{ secrets.DOCKERHUB_TOKEN }}
3536

3637
- name: Login to Github Packages
37-
uses: docker/login-action@v2
38+
uses: docker/login-action@v3
3839
with:
3940
registry: ghcr.io
4041
username: ${{ github.actor }}
4142
password: ${{ secrets.GITHUB_TOKEN }}
4243

43-
- name: Extract metadata (tags, labels) for Docker
44-
id: meta
45-
uses: docker/metadata-action@v4
44+
- name: Extract metadata (tags, labels) for Docker (Jammy)
45+
if: matrix.ubuntu-release-name == 'jammy'
46+
id: meta-jammy
47+
uses: docker/metadata-action@v5
4648
with:
4749
tags: |
48-
type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu
50+
type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }}
51+
type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu
4952
images: |
5053
${{ secrets.IMAGE_NAME }}
5154
ghcr.io/${{ github.repository }}
5255
53-
- name: Build and push Docker images
54-
uses: docker/build-push-action@v4
56+
- name: Extract metadata (tags, labels) for Docker (Others)
57+
if: matrix.ubuntu-release-name != 'jammy'
58+
id: meta-others
59+
uses: docker/metadata-action@v5
60+
with:
61+
tags: |
62+
type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }}
63+
images: |
64+
${{ secrets.IMAGE_NAME }}
65+
ghcr.io/${{ github.repository }}
66+
67+
- name: Build and push Docker images (Jammy)
68+
if: matrix.ubuntu-release-name == 'jammy'
69+
uses: docker/build-push-action@v6
5570
with:
5671
push: true
5772
platforms: linux/amd64,linux/arm64
58-
build-args: PHP_VERSION=${{ matrix.version }}
59-
tags: ${{ steps.meta.outputs.tags }}
60-
labels: ${{ steps.meta.outputs.labels }}
73+
build-args: |
74+
PHP_VERSION=${{ matrix.version }}
75+
UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }}
76+
tags: ${{ steps.meta-jammy.outputs.tags }}
77+
labels: ${{ steps.meta-jammy.outputs.labels }}
78+
79+
- name: Build and push Docker images (Others)
80+
if: matrix.ubuntu-release-name != 'jammy'
81+
uses: docker/build-push-action@v6
82+
with:
83+
push: true
84+
platforms: linux/amd64,linux/arm64
85+
build-args: |
86+
PHP_VERSION=${{ matrix.version }}
87+
UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }}
88+
tags: ${{ steps.meta-others.outputs.tags }}
89+
labels: ${{ steps.meta-others.outputs.labels }}
6190

6291

6392
Build_PHP_CentOS8:
@@ -69,24 +98,24 @@ jobs:
6998
runs-on: ubuntu-latest
7099
steps:
71100
- name: Checkout
72-
uses: actions/checkout@v3
101+
uses: actions/checkout@v4
73102
with:
74103
ref: ${{ github.ref }}
75104

76105
- name: Set up QEMU
77-
uses: docker/setup-qemu-action@v2
106+
uses: docker/setup-qemu-action@v3
78107

79108
- name: Set up Docker Buildx
80-
uses: docker/setup-buildx-action@v2
109+
uses: docker/setup-buildx-action@v3
81110

82111
- name: Login to DockerHub
83-
uses: docker/login-action@v2
112+
uses: docker/login-action@v3
84113
with:
85114
username: ${{ secrets.DOCKERHUB_USERNAME }}
86115
password: ${{ secrets.DOCKERHUB_TOKEN }}
87116

88117
- name: Build and push CentOS based Docker images
89-
uses: docker/build-push-action@v2.4.0
118+
uses: docker/build-push-action@v6
90119
with:
91120
push: true
92121
context: centos8

.github/workflows/test-build.yaml

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Images
1+
name: Build Images (Testing)
22

33
on:
44
push:
@@ -10,39 +10,68 @@ jobs:
1010
strategy:
1111
matrix:
1212
version: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
13+
ubuntu-release-name: ['jammy', 'noble']
1314
environment:
1415
name: Build
1516
runs-on: ubuntu-latest
1617
steps:
1718
- name: Checkout
18-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
1920
with:
2021
ref: ${{ github.ref }}
2122

2223
- name: Set up QEMU
23-
uses: docker/setup-qemu-action@v2
24+
uses: docker/setup-qemu-action@v3
2425

2526
- name: Set up Docker Buildx
26-
uses: docker/setup-buildx-action@v2
27+
uses: docker/setup-buildx-action@v3
2728

28-
- name: Extract metadata (tags, labels) for Docker
29-
id: meta
30-
uses: docker/metadata-action@v4
29+
- name: Extract metadata (tags, labels) for Docker (Jammy)
30+
if: matrix.ubuntu-release-name == 'jammy'
31+
id: meta-jammy
32+
uses: docker/metadata-action@v5
3133
with:
3234
tags: |
33-
type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu
35+
type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }}
36+
type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu
3437
images: |
3538
${{ secrets.IMAGE_NAME }}
3639
ghcr.io/${{ github.repository }}
3740
38-
- name: Build and push Docker images
39-
uses: docker/build-push-action@v4
41+
- name: Extract metadata (tags, labels) for Docker (Others)
42+
if: matrix.ubuntu-release-name != 'jammy'
43+
id: meta-others
44+
uses: docker/metadata-action@v5
45+
with:
46+
tags: |
47+
type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }}
48+
images: |
49+
${{ secrets.IMAGE_NAME }}
50+
ghcr.io/${{ github.repository }}
51+
52+
- name: Build and push Docker images (Jammy)
53+
if: matrix.ubuntu-release-name == 'jammy'
54+
uses: docker/build-push-action@v6
4055
with:
4156
push: false
4257
platforms: linux/amd64,linux/arm64
43-
build-args: PHP_VERSION=${{ matrix.version }}
44-
tags: ${{ steps.meta.outputs.tags }}
45-
labels: ${{ steps.meta.outputs.labels }}
58+
build-args: |
59+
PHP_VERSION=${{ matrix.version }}
60+
UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }}
61+
tags: ${{ steps.meta-jammy.outputs.tags }}
62+
labels: ${{ steps.meta-jammy.outputs.labels }}
63+
64+
- name: Build and push Docker images (Others)
65+
if: matrix.ubuntu-release-name != 'jammy'
66+
uses: docker/build-push-action@v6
67+
with:
68+
push: false
69+
platforms: linux/amd64,linux/arm64
70+
build-args: |
71+
PHP_VERSION=${{ matrix.version }}
72+
UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }}
73+
tags: ${{ steps.meta-others.outputs.tags }}
74+
labels: ${{ steps.meta-others.outputs.labels }}
4675

4776

4877
Build_PHP_CentOS8_Test:
@@ -54,18 +83,18 @@ jobs:
5483
runs-on: ubuntu-latest
5584
steps:
5685
- name: Checkout
57-
uses: actions/checkout@v3
86+
uses: actions/checkout@v4
5887
with:
5988
ref: ${{ github.ref }}
6089

6190
- name: Set up QEMU
62-
uses: docker/setup-qemu-action@v2
91+
uses: docker/setup-qemu-action@v3
6392

6493
- name: Set up Docker Buildx
65-
uses: docker/setup-buildx-action@v2
94+
uses: docker/setup-buildx-action@v3
6695

6796
- name: Build and push CentOS based Docker images
68-
uses: docker/build-push-action@v4
97+
uses: docker/build-push-action@v6
6998
with:
7099
push: false
71100
context: centos8

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ ARG PHP_VERSION=8.2
22

33
# Set a BASE_IMAGE CI var to specify a different base image
44
ARG BASE_IMAGE=ghcr.io/10up/wp-php-fpm
5-
FROM ${BASE_IMAGE}:${PHP_VERSION}-ubuntu
5+
ARG UBUNTU_RELEASE_NAME=jammy
6+
FROM ${BASE_IMAGE}:${PHP_VERSION}-${UBUNTU_RELEASE_NAME}
67

78
ARG PHP_VERSION=8.2
89

@@ -13,8 +14,9 @@ RUN \
1314
apt-get install -y \
1415
php${PHP_VERSION}-xdebug \
1516
mariadb-client \
16-
netcat \
17+
netcat-traditional \
1718
wget \
19+
curl \
1820
git \
1921
strace \
2022
telnet \
@@ -50,7 +52,7 @@ RUN echo "opcache.validate_timestamps=1" >> /etc/php/${PHP_VERSION}/mods-availab
5052

5153
RUN cp -a /etc/skel /home/www-data && chown 33:33 -R /home/www-data && usermod -d /home/www-data www-data
5254
USER www-data
53-
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash && \
55+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash && \
5456
source ~/.profile && \
5557
nvm install --lts && \
5658
composer global require 10up/wpsnapshots && \

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ They are available under the tags:
4141
* ghcr.io/10up/wp-php-fpm-dev:8.1-ubuntu
4242
* ghcr.io/10up/wp-php-fpm-dev:8.2-ubuntu
4343
* ghcr.io/10up/wp-php-fpm-dev:8.3-ubuntu
44+
* Ubuntu 24.04 based (Docker Hub)
45+
* 10up/wp-php-fpm:7.0-noble
46+
* 10up/wp-php-fpm:7.1-noble
47+
* 10up/wp-php-fpm:7.2-noble
48+
* 10up/wp-php-fpm:7.3-noble
49+
* 10up/wp-php-fpm:7.4-noble
50+
* 10up/wp-php-fpm:8.0-noble
51+
* 10up/wp-php-fpm:8.1-noble
52+
* 10up/wp-php-fpm:8.2-noble
53+
* 10up/wp-php-fpm:8.3-noble
54+
* Ubuntu 24.04 based (Github Packages)
55+
* ghcr.io/10up/wp-php-fpm:7.0-noble
56+
* ghcr.io/10up/wp-php-fpm:7.1-noble
57+
* ghcr.io/10up/wp-php-fpm:7.2-noble
58+
* ghcr.io/10up/wp-php-fpm:7.3-noble
59+
* ghcr.io/10up/wp-php-fpm:7.4-noble
60+
* ghcr.io/10up/wp-php-fpm:8.0-noble
61+
* ghcr.io/10up/wp-php-fpm:8.1-noble
62+
* ghcr.io/10up/wp-php-fpm:8.2-noble
63+
* ghcr.io/10up/wp-php-fpm:8.3-noble
4464

4565
## Usage
4666

0 commit comments

Comments
 (0)