Skip to content

Commit 39d83e6

Browse files
Copilotdannystaple
andcommitted
Add Docker caching overlay for all services in CI workflows
Co-authored-by: dannystaple <426859+dannystaple@users.noreply.github.com>
1 parent beb0279 commit 39d83e6

File tree

3 files changed

+55
-3
lines changed

3 files changed

+55
-3
lines changed

.github/workflows/on_call_build_site.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ jobs:
88
steps:
99
- uses: actions/checkout@v4
1010

11+
- name: Set up Docker Buildx
12+
uses: docker/setup-buildx-action@v3
13+
1114
- name: Build the site with docker compose
1215
run: |
13-
docker compose run --build build
16+
docker compose -f docker-compose.yml -f docker-compose.ci.yml run --build build
1417
1518
- name: Tarball the site
1619
run: |

.github/workflows/on_call_staging_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
# Run BDD integration tests using docker compose
4343
echo "## BDD Test Results" >> $GITHUB_STEP_SUMMARY
4444
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
45-
docker compose run test 2>&1 | tee bdd_output.txt
45+
docker compose -f docker-compose.yml -f docker-compose.ci.yml run test 2>&1 | tee bdd_output.txt
4646
bdd_exit_code=$?
4747
cat bdd_output.txt >> $GITHUB_STEP_SUMMARY
4848
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

docker-compose.ci.yml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,56 @@
11
services:
2+
serve:
3+
build:
4+
cache_from:
5+
- type=gha
6+
cache_to:
7+
- type=gha,mode=max
8+
9+
dist:
10+
build:
11+
cache_from:
12+
- type=gha
13+
cache_to:
14+
- type=gha,mode=max
15+
16+
build:
17+
build:
18+
cache_from:
19+
- type=gha
20+
cache_to:
21+
- type=gha,mode=max
22+
223
staging:
324
build:
425
cache_from:
526
- type=gha
627
cache_to:
7-
- type=gha,mode=max
28+
- type=gha,mode=max
29+
30+
test:
31+
build:
32+
cache_from:
33+
- type=gha
34+
cache_to:
35+
- type=gha,mode=max
36+
37+
shell:
38+
build:
39+
cache_from:
40+
- type=gha
41+
cache_to:
42+
- type=gha,mode=max
43+
44+
http_serve:
45+
build:
46+
cache_from:
47+
- type=gha
48+
cache_to:
49+
- type=gha,mode=max
50+
51+
broken_links:
52+
build:
53+
cache_from:
54+
- type=gha
55+
cache_to:
56+
- type=gha,mode=max

0 commit comments

Comments
 (0)