Skip to content

Commit 4548367

Browse files
committed
Revert secondary job pipeline;
Tests building one beeg image
1 parent d88810e commit 4548367

File tree

2 files changed

+46
-75
lines changed

2 files changed

+46
-75
lines changed

.github/workflows/test-build.yaml

Lines changed: 3 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
ubuntu-release-name: ['jammy', 'noble']
1414
environment:
1515
name: Build
16-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v4
@@ -54,7 +54,7 @@ jobs:
5454
uses: docker/build-push-action@v6
5555
with:
5656
push: false
57-
platforms: linux/amd64
57+
platforms: linux/amd64,linux/arm64
5858
build-args: |
5959
PHP_VERSION=${{ matrix.version }}
6060
UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }}
@@ -66,74 +66,7 @@ jobs:
6666
uses: docker/build-push-action@v6
6767
with:
6868
push: false
69-
platforms: linux/amd64
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 }}
75-
76-
Build_PHP_Ubuntu_Test_ARM:
77-
strategy:
78-
matrix:
79-
version: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
80-
ubuntu-release-name: ['jammy', 'noble']
81-
environment:
82-
name: Build
83-
runs-on: ubuntu-22.04-arm
84-
steps:
85-
- name: Checkout
86-
uses: actions/checkout@v4
87-
with:
88-
ref: ${{ github.ref }}
89-
90-
- name: Set up QEMU
91-
uses: docker/setup-qemu-action@v3
92-
93-
- name: Set up Docker Buildx
94-
uses: docker/setup-buildx-action@v3
95-
96-
- name: Extract metadata (tags, labels) for Docker (Jammy)
97-
if: matrix.ubuntu-release-name == 'jammy'
98-
id: meta-jammy
99-
uses: docker/metadata-action@v5
100-
with:
101-
tags: |
102-
type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }}
103-
type=raw,pattern={{version}},value=${{ matrix.version }}-ubuntu
104-
images: |
105-
${{ secrets.IMAGE_NAME }}
106-
ghcr.io/${{ github.repository }}
107-
108-
- name: Extract metadata (tags, labels) for Docker (Others)
109-
if: matrix.ubuntu-release-name != 'jammy'
110-
id: meta-others
111-
uses: docker/metadata-action@v5
112-
with:
113-
tags: |
114-
type=raw,pattern={{version}},value=${{ matrix.version }}-${{ matrix.ubuntu-release-name }}
115-
images: |
116-
${{ secrets.IMAGE_NAME }}
117-
ghcr.io/${{ github.repository }}
118-
119-
- name: Build and push Docker images (Jammy)
120-
if: matrix.ubuntu-release-name == 'jammy'
121-
uses: docker/build-push-action@v6
122-
with:
123-
push: false
124-
platforms: linux/arm64,linux/amd64
125-
build-args: |
126-
PHP_VERSION=${{ matrix.version }}
127-
UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }}
128-
tags: ${{ steps.meta-jammy.outputs.tags }}
129-
labels: ${{ steps.meta-jammy.outputs.labels }}
130-
131-
- name: Build and push Docker images (Others)
132-
if: matrix.ubuntu-release-name != 'jammy'
133-
uses: docker/build-push-action@v6
134-
with:
135-
push: false
136-
platforms: linux/arm64,linux/amd64
69+
platforms: linux/amd64,linux/arm64
13770
build-args: |
13871
PHP_VERSION=${{ matrix.version }}
13972
UBUNTU_RELEASE_NAME=${{ matrix.ubuntu-release-name }}

Dockerfile

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,49 @@
1-
ARG PHP_VERSION=8.2
2-
3-
# Set a BASE_IMAGE CI var to specify a different base image without a tag
4-
ARG BASE_IMAGE=ghcr.io/10up/base-php
51
ARG UBUNTU_RELEASE_NAME=jammy
6-
FROM ${BASE_IMAGE}:${PHP_VERSION}-${UBUNTU_RELEASE_NAME}
2+
FROM ubuntu:${UBUNTU_RELEASE_NAME}
73

84
ARG PHP_VERSION=8.2
5+
ARG UBUNTU_RELEASE_NAME=jammy
6+
7+
SHELL ["/bin/bash", "-c"]
8+
9+
ENV DEBIAN_FRONTEND=noninteractive
10+
11+
12+
RUN \
13+
apt-get update && \
14+
apt-get dist-upgrade -y && \
15+
apt-get install gnupg ca-certificates -y && \
16+
rm -rf /var/lib/apt/lists/*
17+
18+
RUN \
19+
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 && \
20+
mkdir ~/.gnupg && chmod 0700 $_ && \
21+
gpg --no-default-keyring --keyring /usr/share/keyrings/ondrej-ubuntu-php.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C && \
22+
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 && \
23+
apt-get update && \
24+
rm -rf /var/lib/apt/lists/*
25+
26+
RUN \
27+
apt-get update && apt-get install -y \
28+
php${PHP_VERSION}-curl \
29+
php${PHP_VERSION}-xml \
30+
php${PHP_VERSION}-xmlrpc \
31+
php${PHP_VERSION}-memcache \
32+
php${PHP_VERSION}-memcached \
33+
php${PHP_VERSION}-mysql \
34+
php${PHP_VERSION}-gd \
35+
php${PHP_VERSION}-mbstring \
36+
php${PHP_VERSION}-cli \
37+
php${PHP_VERSION}-opcache \
38+
php${PHP_VERSION}-redis \
39+
php${PHP_VERSION}-bcmath \
40+
php${PHP_VERSION}-soap \
41+
php${PHP_VERSION}-zip \
42+
php${PHP_VERSION}-intl \
43+
php${PHP_VERSION}-imagick \
44+
imagemagick && \
45+
rm -rf /var/lib/apt/lists/*
46+
947
ARG TARGETPLATFORM
1048

1149
ENV PHP_VERSION=${PHP_VERSION}

0 commit comments

Comments
 (0)