Skip to content

Commit 0862db5

Browse files
authored
Update build.yml
1 parent a1929be commit 0862db5

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,11 @@ on:
77

88
jobs:
99
build-release:
10-
if: "!github.event.release.prerelease"
1110
runs-on: ubuntu-latest
1211

1312
steps:
1413
- uses: actions/checkout@v2
1514

16-
- name: 'Get Previous tag'
17-
id: previoustag
18-
uses: "WyriHaximus/github-action-get-previous-tag@v1"
19-
with:
20-
fallback: v0.1
21-
2215
- name: Login to Docker Hub
2316
uses: docker/login-action@v1
2417
with:
@@ -29,28 +22,42 @@ jobs:
2922
id: buildx
3023
uses: docker/setup-buildx-action@v1
3124

32-
- name: Build and push
33-
id: docker_build
25+
- name: Build and push PHP with gRPC
26+
id: docker_build_latest
3427
uses: docker/build-push-action@v2
3528
with:
3629
context: ./
3730
file: ./Dockerfile
3831
push: true
3932
platforms: linux/amd64
33+
build-args:
34+
PHP_IMAGE=cli-alpine
4035
tags: |
41-
${{ secrets.DOCKER_HUB_ORG }}/php81-grpc:latest
42-
${{ secrets.DOCKER_HUB_ORG }}/php81-grpc:${{ steps.previoustag.outputs.tag }}
36+
${{ secrets.DOCKER_HUB_ORG }}/php-grpc:latest
4337
44-
- name: Build and push with xdebug
45-
id: docker_build_xdebug
38+
- name: Build and push PHP 8.2 with gRPC
39+
id: docker_build_82
4640
uses: docker/build-push-action@v2
4741
with:
4842
context: ./
4943
file: ./Dockerfile
5044
push: true
5145
platforms: linux/amd64
5246
build-args:
53-
XDEBUG_ENABLED=true
47+
PHP_IMAGE=8.2.3-cli-alpine3.17
5448
tags: |
55-
${{ secrets.DOCKER_HUB_ORG }}/php81-grpc:${{ steps.previoustag.outputs.tag }}-xdebug
49+
${{ secrets.DOCKER_HUB_ORG }}/php-grpc:8.2
5650
51+
- name: Build and push PHP 8.2 with gRPC and xdebug
52+
id: docker_build_82_xdebug
53+
uses: docker/build-push-action@v2
54+
with:
55+
context: ./
56+
file: ./Dockerfile
57+
push: true
58+
platforms: linux/amd64
59+
build-args: |
60+
PHP_IMAGE=8.2.3-cli-alpine3.17
61+
XDEBUG_ENABLED=true
62+
tags: |
63+
${{ secrets.DOCKER_HUB_ORG }}/php-grpc:8.2-xdebug

0 commit comments

Comments
 (0)