This is an automated email from the ASF dual-hosted git repository.

imbajin pushed a commit to branch perf/docker-build-bake
in repository https://gitbox.apache.org/repos/asf/hugegraph.git

commit dff7bf173a5be1a9aca87ee30bf14ab259cf5df1
Author: imbajin <[email protected]>
AuthorDate: Sun Aug 30 02:15:05 2026 +0800

    fix(docker): persist runtime image cache
    
    - export runtime layers to per-image registry caches
    - keep shared Maven cache export isolated
    - avoid broad Dockerfile CI path matching
---
 .github/workflows/docker-build-ci.yml |  1 -
 docker-bake.hcl                       | 12 ++++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/docker-build-ci.yml 
b/.github/workflows/docker-build-ci.yml
index ccaab8035..a3a1ed733 100644
--- a/.github/workflows/docker-build-ci.yml
+++ b/.github/workflows/docker-build-ci.yml
@@ -25,7 +25,6 @@ on:
   pull_request:
     paths:
       - '.github/workflows/docker-build-ci.yml'
-      - '**/Dockerfile*'
       - 'docker-bake.hcl'
       - '.dockerignore'
       - '.mvn/**'
diff --git a/docker-bake.hcl b/docker-bake.hcl
index 47e62f85b..da98fa9ac 100644
--- a/docker-bake.hcl
+++ b/docker-bake.hcl
@@ -73,6 +73,9 @@ target "pd" {
     "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}",
     "type=registry,ref=hugegraph/pd:buildcache-${CACHE_CHANNEL}",
   ]
+  cache-to = EXPORT_CACHE ? [
+    "type=registry,ref=hugegraph/pd:buildcache-${CACHE_CHANNEL},mode=min",
+  ] : []
 }
 
 target "store" {
@@ -84,6 +87,9 @@ target "store" {
     "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}",
     "type=registry,ref=hugegraph/store:buildcache-${CACHE_CHANNEL}",
   ]
+  cache-to = EXPORT_CACHE ? [
+    "type=registry,ref=hugegraph/store:buildcache-${CACHE_CHANNEL},mode=min",
+  ] : []
 }
 
 target "server-hstore" {
@@ -95,6 +101,9 @@ target "server-hstore" {
     "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}",
     "type=registry,ref=hugegraph/server:buildcache-${CACHE_CHANNEL}",
   ]
+  cache-to = EXPORT_CACHE ? [
+    "type=registry,ref=hugegraph/server:buildcache-${CACHE_CHANNEL},mode=min",
+  ] : []
 }
 
 target "server-standalone" {
@@ -106,6 +115,9 @@ target "server-standalone" {
     "type=registry,ref=hugegraph/hugegraph:shared-${CACHE_CHANNEL}",
     "type=registry,ref=hugegraph/hugegraph:buildcache-${CACHE_CHANNEL}",
   ]
+  cache-to = EXPORT_CACHE ? [
+    
"type=registry,ref=hugegraph/hugegraph:buildcache-${CACHE_CHANNEL},mode=min",
+  ] : []
 }
 
 group "default" {

Reply via email to