Skip to content

Commit af1e83b

Browse files
committed
fix: revert to using official PHP images to preserve arm64 architecture
1 parent fd7791f commit af1e83b

10 files changed

Lines changed: 252 additions & 57 deletions

File tree

.github/workflows/publish.5.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ jobs:
1515
matrix:
1616
version: [ '5.6' ]
1717
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
18-
include:
19-
- version: 'latest'
20-
flavor: ''
21-
- version: 'alpine'
22-
flavor: ''
2318
exclude:
2419
- version: '5.6'
2520
flavor: '-alpine'
@@ -38,7 +33,16 @@ jobs:
3833
with:
3934
driver-opts: network=host
4035

41-
- name: Login to DockerHub
36+
- name: Login to DockerHub (pull)
37+
uses: docker/login-action@v3
38+
with:
39+
username: ${{ secrets.DOCKER_PULL_USER_1 }}
40+
password: ${{ secrets.DOCKER_PULL_PASS_1 }}
41+
42+
- name: Pull base image
43+
run: docker pull chialab/php:${{ matrix.version }}${{ matrix.flavor }}
44+
45+
- name: Login to DockerHub (push)
4246
uses: docker/login-action@v3
4347
with:
4448
username: ${{ secrets.DOCKER_USERNAME }}
@@ -60,7 +64,7 @@ jobs:
6064
context: .
6165
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
6266
build-args: |
63-
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
67+
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
6468
tags: |
6569
chialab/php:${{ matrix.version }}${{ matrix.flavor }}
6670
ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}

.github/workflows/publish.7.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ jobs:
1515
matrix:
1616
version: [ '7.0', '7.1', '7.2', '7.3', '7.4' ]
1717
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
18-
include:
19-
- version: 'latest'
20-
flavor: ''
21-
- version: 'alpine'
22-
flavor: ''
2318
exclude:
2419
- version: '7.0'
2520
flavor: '-alpine'
@@ -38,7 +33,16 @@ jobs:
3833
with:
3934
driver-opts: network=host
4035

41-
- name: Login to DockerHub
36+
- name: Login to DockerHub (pull)
37+
uses: docker/login-action@v3
38+
with:
39+
username: ${{ secrets.DOCKER_PULL_USER_2 }}
40+
password: ${{ secrets.DOCKER_PULL_PASS_2 }}
41+
42+
- name: Pull base image
43+
run: docker pull chialab/php:${{ matrix.version }}${{ matrix.flavor }}
44+
45+
- name: Login to DockerHub (push)
4246
uses: docker/login-action@v3
4347
with:
4448
username: ${{ secrets.DOCKER_USERNAME }}
@@ -60,7 +64,7 @@ jobs:
6064
context: .
6165
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
6266
build-args: |
63-
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
67+
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
6468
tags: |
6569
chialab/php:${{ matrix.version }}${{ matrix.flavor }}
6670
ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}

.github/workflows/publish.8.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ jobs:
1515
matrix:
1616
version: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
1717
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
18-
include:
19-
- version: 'latest'
20-
flavor: ''
21-
- version: 'alpine'
22-
flavor: ''
2318
steps:
2419
- name: Checkout
2520
uses: actions/checkout@v4
@@ -33,7 +28,16 @@ jobs:
3328
with:
3429
driver-opts: network=host
3530

36-
- name: Login to DockerHub
31+
- name: Login to DockerHub (pull)
32+
uses: docker/login-action@v3
33+
with:
34+
username: ${{ secrets.DOCKER_PULL_USER_3 }}
35+
password: ${{ secrets.DOCKER_PULL_PASS_3 }}
36+
37+
- name: Pull base image
38+
run: docker pull chialab/php:${{ matrix.version }}${{ matrix.flavor }}
39+
40+
- name: Login to DockerHub (push)
3741
uses: docker/login-action@v3
3842
with:
3943
username: ${{ secrets.DOCKER_USERNAME }}
@@ -55,7 +59,7 @@ jobs:
5559
context: .
5660
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
5761
build-args: |
58-
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
62+
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
5963
tags: |
6064
chialab/php:${{ matrix.version }}${{ matrix.flavor }}
6165
ghcr.io/chialab/php:${{ matrix.version }}${{ matrix.flavor }}

.github/workflows/publish.compat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ jobs:
3131
- name: Login to DockerHub (pull)
3232
uses: docker/login-action@v3
3333
with:
34-
username: ${{ secrets.DOCKER_PULL_USER_1 }}
35-
password: ${{ secrets.DOCKER_PULL_PASS_1 }}
34+
username: ${{ secrets.DOCKER_PULL_USER_4 }}
35+
password: ${{ secrets.DOCKER_PULL_PASS_4 }}
3636

3737
- name: Pull base image
3838
run: |
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Publish latest PHP images
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Test latest PHP images"]
6+
branches: [main]
7+
types: [completed]
8+
9+
jobs:
10+
publish-8:
11+
name: Build and publish PHP 8 images
12+
runs-on: ubuntu-22.04
13+
if: ${{ github.event.workflow_run.conclusion == 'success' && !contains(github.event.commits[0].message, '[skip ci]') && !contains(github.event.commits[0].message, '[ci skip]') }}
14+
strategy:
15+
matrix:
16+
version: [ 'latest', 'alpine' ]
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Set up QEMU
22+
run: |
23+
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
27+
with:
28+
driver-opts: network=host
29+
30+
- name: Login to DockerHub (pull)
31+
uses: docker/login-action@v3
32+
with:
33+
username: ${{ secrets.DOCKER_PULL_USER_5 }}
34+
password: ${{ secrets.DOCKER_PULL_PASS_5 }}
35+
36+
- name: Pull base image
37+
run: docker pull chialab/php:${{ matrix.version }}
38+
39+
- name: Login to DockerHub (push)
40+
uses: docker/login-action@v3
41+
with:
42+
username: ${{ secrets.DOCKER_USERNAME }}
43+
password: ${{ secrets.DOCKER_PASSWORD }}
44+
45+
- name: Login to GitHub Container Registry
46+
uses: docker/login-action@v3
47+
with:
48+
registry: ghcr.io
49+
username: ${{ github.repository_owner }}
50+
password: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Build image and push to registry
53+
uses: docker/build-push-action@v5
54+
with:
55+
platforms: linux/amd64,linux/arm64
56+
cache-from: type=registry,ref=ghcr.io/chialab/php:${{ matrix.version }}
57+
cache-to: type=inline
58+
context: .
59+
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
60+
build-args: |
61+
BASE_IMAGE=chialab/php:${{ matrix.version }}
62+
tags: |
63+
chialab/php:${{ matrix.version }}
64+
ghcr.io/chialab/php:${{ matrix.version }}
65+
push: true
66+
67+
- name: Build dev image and push to registry
68+
uses: docker/build-push-action@v5
69+
with:
70+
platforms: linux/amd64,linux/arm64
71+
cache-to: type=inline
72+
context: ./dev
73+
build-args: |
74+
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}
75+
tags: |
76+
chialab/php-dev:${{ matrix.version }}
77+
ghcr.io/chialab/php-dev:${{ matrix.version }}
78+
push: true
79+
80+
- name: Build PCOV image and push to registry
81+
uses: docker/build-push-action@v5
82+
with:
83+
platforms: linux/amd64,linux/arm64
84+
cache-to: type=inline
85+
context: ./pcov
86+
build-args: |
87+
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}
88+
tags: |
89+
chialab/php-pcov:${{ matrix.version }}
90+
ghcr.io/chialab/php-pcov:${{ matrix.version }}
91+
push: true
92+
93+
- name: Build xhprof image (amd64 only) and push to registry
94+
uses: docker/build-push-action@v5
95+
with:
96+
cache-to: type=inline
97+
context: ./xhprof
98+
build-args: |
99+
BASE_IMAGE=ghcr.io/chialab/php:${{ matrix.version }}
100+
tags: |
101+
chialab/php-xhprof:${{ matrix.version }}
102+
ghcr.io/chialab/php-xhprof:${{ matrix.version }}
103+
push: true

.github/workflows/test.5.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ jobs:
1818
matrix:
1919
version: [ '5.6' ]
2020
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
21-
include:
22-
- version: 'latest'
23-
flavor: ''
24-
- version: 'alpine'
25-
flavor: ''
2621
exclude:
2722
- version: '5.6'
2823
flavor: '-alpine'
@@ -37,12 +32,11 @@ jobs:
3732
- name: Checkout
3833
uses: actions/checkout@v4
3934

40-
- name: Login to GitHub Container Registry
35+
- name: Login to DockerHub
4136
uses: docker/login-action@v3
4237
with:
43-
registry: ghcr.io
44-
username: ${{ github.repository_owner }}
45-
password: ${{ secrets.GITHUB_TOKEN }}
38+
username: ${{ secrets.DOCKER_PULL_USER_1 }}
39+
password: ${{ secrets.DOCKER_PULL_PASS_1 }}
4640

4741
- name: Build image for testing
4842
uses: docker/build-push-action@v5
@@ -52,7 +46,7 @@ jobs:
5246
context: .
5347
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
5448
build-args: |
55-
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
49+
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
5650
tags: localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
5751
push: true
5852

.github/workflows/test.7.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ jobs:
1818
matrix:
1919
version: [ '7.0', '7.1', '7.2', '7.3', '7.4' ]
2020
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
21-
include:
22-
- version: 'latest'
23-
flavor: ''
24-
- version: 'alpine'
25-
flavor: ''
2621
exclude:
2722
- version: '7.0'
2823
flavor: '-alpine'
@@ -37,12 +32,11 @@ jobs:
3732
- name: Checkout
3833
uses: actions/checkout@v4
3934

40-
- name: Login to GitHub Container Registry
35+
- name: Login to DockerHub
4136
uses: docker/login-action@v3
4237
with:
43-
registry: ghcr.io
44-
username: ${{ github.repository_owner }}
45-
password: ${{ secrets.GITHUB_TOKEN }}
38+
username: ${{ secrets.DOCKER_PULL_USER_2 }}
39+
password: ${{ secrets.DOCKER_PULL_PASS_2 }}
4640

4741
- name: Build image for testing
4842
uses: docker/build-push-action@v5
@@ -52,7 +46,7 @@ jobs:
5246
context: .
5347
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
5448
build-args: |
55-
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
49+
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
5650
tags: localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
5751
push: true
5852

.github/workflows/test.8.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ jobs:
1818
matrix:
1919
version: [ '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
2020
flavor: [ '', '-apache', '-fpm', '-alpine', '-fpm-alpine' ]
21-
include:
22-
- version: 'latest'
23-
flavor: ''
24-
- version: 'alpine'
25-
flavor: ''
2621
services:
2722
registry:
2823
image: registry:2
@@ -32,12 +27,11 @@ jobs:
3227
- name: Checkout
3328
uses: actions/checkout@v4
3429

35-
- name: Login to GitHub Container Registry
30+
- name: Login to DockerHub
3631
uses: docker/login-action@v3
3732
with:
38-
registry: ghcr.io
39-
username: ${{ github.repository_owner }}
40-
password: ${{ secrets.GITHUB_TOKEN }}
33+
username: ${{ secrets.DOCKER_PULL_USER_3 }}
34+
password: ${{ secrets.DOCKER_PULL_PASS_3 }}
4135

4236
- name: Build image for testing
4337
uses: docker/build-push-action@v5
@@ -47,7 +41,7 @@ jobs:
4741
context: .
4842
file: ${{ ((contains(matrix.flavor, 'alpine') || matrix.version == 'alpine') && 'Dockerfile.alpine') || 'Dockerfile' }}
4943
build-args: |
50-
BASE_IMAGE=ghcr.io/chialab/php-mirror:${{ matrix.version }}${{ matrix.flavor }}
44+
BASE_IMAGE=chialab/php:${{ matrix.version }}${{ matrix.flavor }}
5145
tags: localhost:5000/chialab/php:${{ matrix.version }}${{ matrix.flavor }}
5246
push: true
5347

.github/workflows/test.compat.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ on:
55
# chosen by fair dice roll
66
- cron: '42 18 * * 2'
77
push:
8-
branches:
9-
- main
8+
branches: [main]
109
pull_request:
1110
types: [opened, synchronize]
1211

@@ -31,8 +30,8 @@ jobs:
3130
- name: Login to DockerHub
3231
uses: docker/login-action@v3
3332
with:
34-
username: ${{ secrets.DOCKER_PULL_USER_1 }}
35-
password: ${{ secrets.DOCKER_PULL_PASS_1 }}
33+
username: ${{ secrets.DOCKER_PULL_USER_4 }}
34+
password: ${{ secrets.DOCKER_PULL_PASS_4 }}
3635

3736
- name: Build image for testing
3837
uses: docker/build-push-action@v5

0 commit comments

Comments
 (0)