Skip to content

Commit b42865d

Browse files
committed
Caching
1 parent 8ed4d7b commit b42865d

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

.github/workflows/build.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ jobs:
3535
- name: Set up Docker Buildx
3636
uses: docker/setup-buildx-action@v3
3737

38-
- uses: satackey/[email protected]
39-
# Ignore the failure of a step and avoid terminating the job.
40-
continue-on-error: true
41-
4238
- name: Cache Docker layers
4339
uses: actions/cache@v4
4440
with:

docker-compose.build.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ services:
22
frontend:
33
image: ${WS_DOCKER_REGISTRY}/workspaces-frontend:${ENV}
44
build:
5+
cache_from:
6+
- type=gha
7+
cache_to:
8+
- type=gha
59
context: frontend
610
args:
711
VITE_TDEI_API_URL: ${WS_TDEI_API_URL}
@@ -19,6 +23,10 @@ services:
1923
rapid:
2024
image: ${WS_DOCKER_REGISTRY}/workspaces-rapid:${ENV}
2125
build:
26+
cache_from:
27+
- type=gha
28+
cache_to:
29+
- type=gha
2230
context: rapid
2331

2432
rapid_tag:
@@ -28,6 +36,10 @@ services:
2836
pathways-editor:
2937
image: ${WS_DOCKER_REGISTRY}/workspaces-pathways-editor:${ENV}
3038
build:
39+
cache_from:
40+
- type=gha
41+
cache_to:
42+
- type=gha
3143
context: pathways-editor
3244

3345
pathways-editor_tag:
@@ -37,6 +49,10 @@ services:
3749
osm-log-proxy:
3850
image: ${WS_DOCKER_REGISTRY}/workspaces-osm-log-proxy:${ENV}
3951
build:
52+
cache_from:
53+
- type=gha
54+
cache_to:
55+
- type=gha
4056
context: osm-log-proxy
4157

4258
osm-log-proxy_tag:
@@ -46,6 +62,10 @@ services:
4662
osm-web:
4763
image: ${WS_DOCKER_REGISTRY}/workspaces-osm-web:${ENV}
4864
build:
65+
cache_from:
66+
- type=gha
67+
cache_to:
68+
- type=gha
4969
context: osm-web
5070

5171
osm-web_tag:
@@ -56,9 +76,9 @@ services:
5676
image: ${WS_DOCKER_REGISTRY}/workspaces-osm-rails:${ENV}
5777
build:
5878
cache_from:
59-
- type=local,src=/tmp/.buildkit-cache/osm-rails
79+
- type=gha
6080
cache_to:
61-
- type=local,dest=/tmp/.buildkit-cache-new/osm-rails,mode=max
81+
- type=gha
6282
context: osm-rails
6383
dockerfile: Dockerfile.prod
6484

@@ -70,9 +90,9 @@ services:
7090
image: ${WS_DOCKER_REGISTRY}/workspaces-osm-cgimap:${ENV}
7191
build:
7292
cache_from:
73-
- type=local,src=/tmp/.buildkit-cache/osm-cgimap
93+
- type=gha
7494
cache_to:
75-
- type=local,dest=/tmp/.buildkit-cache-new/osm-cgimap,mode=max
95+
- type=gha
7696
context: osm-cgimap
7797
dockerfile: docker/ubuntu/Dockerfile2404
7898

@@ -83,6 +103,10 @@ services:
83103
tasks-frontend:
84104
image: ${WS_DOCKER_REGISTRY}/workspaces-tasks-frontend:${ENV}
85105
build:
106+
cache_from:
107+
- type=gha
108+
cache_to:
109+
- type=gha
86110
context: tasking-manager
87111
dockerfile: ./scripts/docker/Dockerfile.frontend
88112
args:
@@ -97,6 +121,10 @@ services:
97121
tasks-backend:
98122
image: ${WS_DOCKER_REGISTRY}/workspaces-tasks-backend:${ENV}
99123
build:
124+
cache_from:
125+
- type=gha
126+
cache_to:
127+
- type=gha
100128
context: tasking-manager
101129
dockerfile: ./scripts/docker/Dockerfile.backend
102130
target: prod

0 commit comments

Comments
 (0)