@@ -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
0 commit comments