Skip to content

Commit 2972f2e

Browse files
authored
Merge pull request spiral#2 from johnny-silverhand/patch-1
Update build.yml
2 parents a1929be + 46e71f9 commit 2972f2e

File tree

1 file changed

+49
-15
lines changed

1 file changed

+49
-15
lines changed

.github/workflows/build.yml

Lines changed: 49 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,69 @@ 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.1 with gRPC
39+
id: docker_build_81
4640
uses: docker/build-push-action@v2
4741
with:
4842
context: ./
4943
file: ./Dockerfile
5044
push: true
5145
platforms: linux/amd64
52-
build-args:
46+
build-args: |
47+
PHP_IMAGE=8.1.3-cli-alpine3.15
48+
tags: |
49+
${{ secrets.DOCKER_HUB_ORG }}/php-grpc:8.1
50+
51+
- name: Build and push PHP 8.1 with gRPC and xdebug
52+
id: docker_build_81_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.1.3-cli-alpine3.15
5361
XDEBUG_ENABLED=true
5462
tags: |
55-
${{ secrets.DOCKER_HUB_ORG }}/php81-grpc:${{ steps.previoustag.outputs.tag }}-xdebug
63+
${{ secrets.DOCKER_HUB_ORG }}/php-grpc:8.1-xdebug
64+
65+
- name: Build and push PHP 8.2 with gRPC
66+
id: docker_build_82
67+
uses: docker/build-push-action@v2
68+
with:
69+
context: ./
70+
file: ./Dockerfile
71+
push: true
72+
platforms: linux/amd64
73+
build-args: |
74+
PHP_IMAGE=8.2.3-cli-alpine3.17
75+
tags: |
76+
${{ secrets.DOCKER_HUB_ORG }}/php-grpc:8.2
5677
78+
- name: Build and push PHP 8.2 with gRPC and xdebug
79+
id: docker_build_82_xdebug
80+
uses: docker/build-push-action@v2
81+
with:
82+
context: ./
83+
file: ./Dockerfile
84+
push: true
85+
platforms: linux/amd64
86+
build-args: |
87+
PHP_IMAGE=8.2.3-cli-alpine3.17
88+
XDEBUG_ENABLED=true
89+
tags: |
90+
${{ secrets.DOCKER_HUB_ORG }}/php-grpc:8.2-xdebug

0 commit comments

Comments
 (0)