Skip to content

Commit 1c57272

Browse files
committed
ci: add Docker BuildKit cache to e2e workflow
1 parent 579345b commit 1c57272

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

.github/workflows/e2e.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,20 @@ jobs:
1717
strategy:
1818
matrix:
1919
suite: [vitest, cypress]
20+
env:
21+
BUILDX_CACHE_SCOPE: ${{ matrix.suite }}-build
2022

2123
steps:
2224
- name: Checkout code
2325
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2426

2527
- name: Set up Docker Buildx
2628
uses: docker/setup-buildx-action@d91f340399fb2345e3e45f5461e116862b08261d
29+
with:
30+
install: true
31+
32+
- name: Expose GitHub Runtime for Docker Cache
33+
uses: crazy-max/ghaction-github-runtime@3cb05d89e1f492524af3d41a1c98c83bc3025124 # v3
2734

2835
- name: Set up Docker Compose
2936
uses: docker/setup-compose-action@e29e0ecd235838be5f2e823f8f512a72dc55f662
@@ -44,7 +51,7 @@ jobs:
4451
git config --global init.defaultBranch main
4552
4653
- name: Build and start services with Docker Compose
47-
run: docker compose up -d --build --wait || true
54+
run: docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d --build --wait
4855

4956
- name: Debug service state
5057
if: failure()

docker-compose.ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
services:
2+
git-proxy:
3+
build:
4+
context: .
5+
cache_from:
6+
- type=gha
7+
cache_to:
8+
- type=gha,mode=max
9+
10+
git-server:
11+
build:
12+
context: localgit/
13+
cache_from:
14+
- type=gha
15+
cache_to:
16+
- type=gha,mode=max

0 commit comments

Comments
 (0)