Skip to content

Commit 9a509c4

Browse files
feat:Update php build action
1 parent 9855e70 commit 9a509c4

File tree

1 file changed

+5
-77
lines changed

1 file changed

+5
-77
lines changed

.github/workflows/php8-release.yml

Lines changed: 5 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,10 @@ name: Build PHP 8 Image
33
on:
44
workflow_dispatch:
55
inputs:
6-
php84Version:
7-
description: 'PHP 8.4 Version'
6+
phpVersion:
7+
description: 'PHP Version'
88
default: '8.4.6'
99
required: true
10-
php83Version:
11-
description: 'PHP 8.3 Version'
12-
default: '8.3.20'
13-
required: true
14-
php82Version:
15-
description: 'PHP 8.2 Version'
16-
default: '8.2.28'
17-
required: true
18-
php81Version:
19-
description: 'PHP 8.1 Version'
20-
default: '8.1.31'
21-
required: true
22-
php80Version:
23-
description: 'PHP 8.0 Version'
24-
default: '8.0.30'
25-
required: true
26-
2710
jobs:
2811
docker:
2912
runs-on: ubuntu-latest
@@ -42,72 +25,17 @@ jobs:
4225
with:
4326
username: ${{ secrets.DOCKERHUB_USERNAME }}
4427
password: ${{ secrets.DOCKERHUB_PASSWORD }}
45-
- name: Build PHP-8.4 and Push
46-
uses: docker/build-push-action@v5
47-
with:
48-
context: php/7
49-
file: php/7/Dockerfile
50-
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
51-
push: true
52-
build-args:
53-
PHP_VERSION=${{ github.event.inputs.php84Version }}
54-
tags: |
55-
1panel/php:${{ github.event.inputs.php84Version }}-fpm
56-
cache-from: type=gha
57-
cache-to: type=gha,mode=max
58-
59-
- name: Build PHP-8.3 and Push
60-
uses: docker/build-push-action@v5
61-
with:
62-
context: php/7
63-
file: php/7/Dockerfile
64-
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
65-
push: true
66-
build-args:
67-
PHP_VERSION=${{ github.event.inputs.php83Version }}
68-
tags: |
69-
1panel/php:${{ github.event.inputs.php83Version }}-fpm
70-
cache-from: type=gha
71-
cache-to: type=gha,mode=max
72-
73-
- name: Build PHP-8.2 and Push
74-
uses: docker/build-push-action@v5
75-
with:
76-
context: php/7
77-
file: php/7/Dockerfile
78-
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
79-
push: true
80-
build-args:
81-
PHP_VERSION=${{ github.event.inputs.php82Version }}
82-
tags: |
83-
1panel/php:${{ github.event.inputs.php82Version }}-fpm
84-
cache-from: type=gha
85-
cache-to: type=gha,mode=max
86-
87-
- name: Build PHP-8.1 and Push
28+
- name: Build PHP-FPM Image and Push
8829
uses: docker/build-push-action@v5
8930
with:
9031
context: php/7
9132
file: php/7/Dockerfile
9233
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
9334
push: true
9435
build-args:
95-
PHP_VERSION=${{ github.event.inputs.php81Version }}
36+
PHP_VERSION=${{ github.event.inputs.phpVersion }}
9637
tags: |
97-
1panel/php:${{ github.event.inputs.php81Version }}-fpm
38+
1panel/php:${{ github.event.inputs.phpVersion }}-fpm
9839
cache-from: type=gha
9940
cache-to: type=gha,mode=max
10041

101-
- name: Build PHP-8.0 and Push
102-
uses: docker/build-push-action@v5
103-
with:
104-
context: php/7
105-
file: php/7/Dockerfile
106-
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
107-
push: true
108-
build-args:
109-
PHP_VERSION=${{ github.event.inputs.php80Version }}
110-
tags: |
111-
1panel/php:${{ github.event.inputs.php80Version }}-fpm
112-
cache-from: type=gha
113-
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)