This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 06dd2ad2510 Optimizing CI/CD with Multi-Level Isolated Caching, part 2
(#38220)
06dd2ad2510 is described below
commit 06dd2ad25103a1c4c95910c72fcee9621cddcf9d
Author: Hongsheng Zhong <[email protected]>
AuthorDate: Fri Feb 27 09:38:38 2026 +0800
Optimizing CI/CD with Multi-Level Isolated Caching, part 2 (#38220)
* Refactor setup-build-environment
* workflow: split cache restore/save
---
.github/workflows/nightly-e2e-operation.yml | 2 +-
.../resources/actions/setup-build-environment/action.yml | 13 ++++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/nightly-e2e-operation.yml
b/.github/workflows/nightly-e2e-operation.yml
index b264f59cf97..c83aaea824d 100644
--- a/.github/workflows/nightly-e2e-operation.yml
+++ b/.github/workflows/nightly-e2e-operation.yml
@@ -100,7 +100,7 @@ jobs:
- uses: ./.github/workflows/resources/actions/setup-build-environment
with:
java-version: ${{ matrix.java-version }}
- cache-suffix: 'e2e'
+ cache-suffix: 'e2e-operation'
- uses: docker/setup-docker-action@v4
with:
version: v28.0.4
diff --git
a/.github/workflows/resources/actions/setup-build-environment/action.yml
b/.github/workflows/resources/actions/setup-build-environment/action.yml
index 70a91968182..9ada12c4194 100644
--- a/.github/workflows/resources/actions/setup-build-environment/action.yml
+++ b/.github/workflows/resources/actions/setup-build-environment/action.yml
@@ -80,7 +80,9 @@ runs:
java-version: ${{ inputs.java-version }}
github-token: ${{ inputs.github-token }}
native-image-job-reports: 'true'
- - uses: actions/[email protected]
+ - name: Restore Maven Cache
+ id: restore-maven-cache
+ uses: actions/cache/[email protected]
with:
path: |
~/.m2/repository
@@ -92,3 +94,12 @@ runs:
${{ inputs.cache-prefix }}-maven-full-
${{ inputs.cache-prefix }}-maven-
${{ inputs.cache-prefix }}-
+ - name: Save Maven Cache
+ if: github.event_name != 'pull_request' &&
steps.restore-maven-cache.outputs.cache-hit != 'true'
+ uses: actions/cache/[email protected]
+ with:
+ path: |
+ ~/.m2/repository
+ !~/.m2/repository/org/apache/shardingsphere
+ ~/.m2/repository/org/apache/shardingsphere/elasticjob
+ key: ${{ inputs.cache-prefix }}-maven-${{ inputs.cache-suffix }}-${{
hashFiles('**/pom.xml') }}