Skip to content

Commit 05b9a18

Browse files
committed
try out docker build cache
1 parent 4169bf8 commit 05b9a18

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

.github/workflows/integration-test-cluster-neo4j-5.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@ jobs:
1616

1717
steps:
1818
- 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+
1938
- name: Populate .env
2039
run: |
2140
echo "PHP_VERSION=${{ matrix.php }}" > .env
@@ -37,7 +56,7 @@ jobs:
3756
3857
- name: Run integration tests
3958
run: |
40-
docker compose up -d --build --remove-orphans --wait \
59+
docker compose up -d --remove-orphans --wait --no-build \
4160
server1 \
4261
server2 \
4362
server3 \

docker-compose-neo4j-4.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ networks:
2828

2929
services:
3030
client:
31+
image: "integration-client:${PHP_VERSION-8.1}"
3132
build:
3233
context: .
3334
dockerfile: Dockerfile

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ x-definitions:
2222
- .env
2323
x-common-php:
2424
&common-php
25+
image: "integration-client:${PHP_VERSION-8.1}"
2526
build:
2627
context: .
2728
dockerfile: Dockerfile

0 commit comments

Comments
 (0)