File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 16
16
17
17
steps :
18
18
- uses : actions/checkout@v4
19
+
20
+ # 2) enable BuildKit
21
+ - name : Set up Docker Buildx
22
+ uses : docker/setup-buildx-action@v2
23
+
24
+ # 3) build & cache the client image
25
+ - name : Build & cache client image
26
+ uses : docker/build-push-action@v3
27
+ with :
28
+ context : .
29
+ file : Dockerfile
30
+ load : true # so the image is available locally
31
+ push : false
32
+ cache-from : type=gha
33
+ cache-to : type=gha,mode=max
34
+ build-args : PHP_VERSION=${{ matrix.php }}
35
+ tags : integration-client:${{ matrix.php }}
36
+
37
+
19
38
- name : Populate .env
20
39
run : |
21
40
echo "PHP_VERSION=${{ matrix.php }}" > .env
37
56
38
57
- name : Run integration tests
39
58
run : |
40
- docker compose up -d --build -- remove-orphans --wait \
59
+ docker compose up -d --remove-orphans --wait --no-build \
41
60
server1 \
42
61
server2 \
43
62
server3 \
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ networks:
28
28
29
29
services :
30
30
client :
31
+ image : " integration-client:${PHP_VERSION-8.1}"
31
32
build :
32
33
context : .
33
34
dockerfile : Dockerfile
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ x-definitions:
22
22
- .env
23
23
x-common-php :
24
24
&common-php
25
+ image : " integration-client:${PHP_VERSION-8.1}"
25
26
build :
26
27
context : .
27
28
dockerfile : Dockerfile
You can’t perform that action at this time.
0 commit comments