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 3153dc7cfd3 workflow: add enable-docker-setup input to configure
Docker setup in workflows (#38265)
3153dc7cfd3 is described below
commit 3153dc7cfd3664ec456c04d7324594ba701f42b9
Author: Hongsheng Zhong <[email protected]>
AuthorDate: Sat Feb 28 14:17:42 2026 +0800
workflow: add enable-docker-setup input to configure Docker setup in
workflows (#38265)
---
.github/workflows/e2e-agent.yml | 10 ++--------
.github/workflows/e2e-operation.yml | 10 ++--------
.github/workflows/e2e-sql.yml | 10 ++--------
.github/workflows/nightly-e2e-agent.yml | 10 ++--------
.github/workflows/nightly-e2e-operation.yml | 10 ++--------
.github/workflows/nightly-e2e-sql.yml | 10 ++--------
.../resources/actions/setup-build-environment/action.yml | 10 ++++++++++
7 files changed, 22 insertions(+), 48 deletions(-)
diff --git a/.github/workflows/e2e-agent.yml b/.github/workflows/e2e-agent.yml
index 9b021c74815..15d3639d103 100644
--- a/.github/workflows/e2e-agent.yml
+++ b/.github/workflows/e2e-agent.yml
@@ -63,10 +63,7 @@ jobs:
java-version: 21
cache-suffix: 'e2e-agent'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- name: Build Project
run: ./mvnw -B clean install -DskipTests -Prelease,default-dep
- name: Build Proxy E2E Image
@@ -134,10 +131,7 @@ jobs:
java-version: 21
cache-suffix: 'e2e-agent'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- name: Download Proxy E2E Image
if: matrix.adapter == 'proxy'
uses: actions/download-artifact@v4
diff --git a/.github/workflows/e2e-operation.yml
b/.github/workflows/e2e-operation.yml
index 609b96eb6b1..ddf8d08dc6d 100644
--- a/.github/workflows/e2e-operation.yml
+++ b/.github/workflows/e2e-operation.yml
@@ -67,10 +67,7 @@ jobs:
with:
cache-suffix: 'e2e-operation'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- name: Maven Install
env:
PREFIX: "test/e2e/operation/"
@@ -118,10 +115,7 @@ jobs:
with:
cache-suffix: 'e2e-operation'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- uses: ./.github/workflows/resources/actions/download-e2e-artifacts
- name: Run ${{ matrix.operation }} on ${{ matrix.image.version }}
run: ./mvnw -nsu -B install -f test/e2e/operation/${{ matrix.operation
}}/pom.xml -De2e.run.type=docker -D${{ matrix.image.type }}=${{
matrix.image.version }}
diff --git a/.github/workflows/e2e-sql.yml b/.github/workflows/e2e-sql.yml
index 8cd0beb9a62..95e68fbb4b9 100644
--- a/.github/workflows/e2e-sql.yml
+++ b/.github/workflows/e2e-sql.yml
@@ -66,10 +66,7 @@ jobs:
with:
cache-suffix: 'e2e-sql'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- name: Build E2E Image
run: ./mvnw -B clean install -am -pl test/e2e/sql -Pe2e.env.docker
-DskipTests -Dspotless.apply.skip=true
- uses: ./.github/workflows/resources/actions/save-maven-cache
@@ -124,10 +121,7 @@ jobs:
with:
cache-suffix: 'e2e-sql'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- name: Download E2E Image
if: matrix.adapter == 'proxy'
uses: actions/download-artifact@v4
diff --git a/.github/workflows/nightly-e2e-agent.yml
b/.github/workflows/nightly-e2e-agent.yml
index 56f75833014..240eb22d730 100644
--- a/.github/workflows/nightly-e2e-agent.yml
+++ b/.github/workflows/nightly-e2e-agent.yml
@@ -51,10 +51,7 @@ jobs:
java-version: 21
cache-suffix: 'e2e-agent'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- name: Build Project
run: ./mvnw -B clean install -DskipTests -Prelease,default-dep
- name: Build Proxy E2E Image
@@ -122,10 +119,7 @@ jobs:
java-version: 21
cache-suffix: 'e2e-agent'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- name: Download Proxy E2E Image
if: matrix.adapter == 'proxy'
uses: actions/download-artifact@v4
diff --git a/.github/workflows/nightly-e2e-operation.yml
b/.github/workflows/nightly-e2e-operation.yml
index 5fd0b8fd636..9131b7537d5 100644
--- a/.github/workflows/nightly-e2e-operation.yml
+++ b/.github/workflows/nightly-e2e-operation.yml
@@ -55,10 +55,7 @@ jobs:
with:
cache-suffix: 'e2e-operation'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- name: Maven Install
env:
PREFIX: "test/e2e/operation/"
@@ -117,10 +114,7 @@ jobs:
java-version: ${{ matrix.java-version }}
cache-suffix: 'e2e-operation'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- uses: ./.github/workflows/resources/actions/download-e2e-artifacts
- name: Run ${{ matrix.operation }} on ${{ matrix.image.version }}
run: ./mvnw -nsu -B install -f test/e2e/operation/${{ matrix.operation
}}/pom.xml -De2e.run.type=docker -D${{ matrix.image.type }}=${{
matrix.image.version }}
diff --git a/.github/workflows/nightly-e2e-sql.yml
b/.github/workflows/nightly-e2e-sql.yml
index 60781830ab1..cd4d067bfc3 100644
--- a/.github/workflows/nightly-e2e-sql.yml
+++ b/.github/workflows/nightly-e2e-sql.yml
@@ -52,10 +52,7 @@ jobs:
cache-prefix: ${{
needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}
cache-suffix: 'e2e-sql'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- name: Build E2E Image
run: ./mvnw -B clean install -am -pl test/e2e/sql -Pe2e.env.docker
-DskipTests -Dspotless.apply.skip=true
- uses: ./.github/workflows/resources/actions/save-maven-cache
@@ -118,10 +115,7 @@ jobs:
cache-prefix: ${{
needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}
cache-suffix: 'e2e-sql'
cache-save-enabled: 'false'
- - uses: docker/setup-docker-action@v4
- with:
- version: v28.0.4
- set-host: true
+ enable-docker-setup: 'true'
- name: Download E2E Image
if: matrix.adapter == 'proxy'
uses: actions/download-artifact@v4
diff --git
a/.github/workflows/resources/actions/setup-build-environment/action.yml
b/.github/workflows/resources/actions/setup-build-environment/action.yml
index 88d1465f238..e179b9fb7a8 100644
--- a/.github/workflows/resources/actions/setup-build-environment/action.yml
+++ b/.github/workflows/resources/actions/setup-build-environment/action.yml
@@ -66,6 +66,10 @@ inputs:
description: 'GitHub token for GraalVM setup (required when distribution
is graalvm)'
required: false
default: ''
+ enable-docker-setup:
+ description: 'Whether to setup Docker via docker/setup-docker-action (set
to true for GitHub-hosted runners that need Docker setup)'
+ required: false
+ default: 'false'
outputs:
cache-hit:
description: 'A boolean value to indicate an exact match was found for the
primary key'
@@ -91,6 +95,12 @@ runs:
java-version: ${{ inputs.java-version }}
github-token: ${{ inputs.github-token }}
native-image-job-reports: 'true'
+ - name: Setup Docker
+ if: inputs.enable-docker-setup == 'true'
+ uses: docker/setup-docker-action@v4
+ with:
+ version: v28.0.4
+ set-host: true
- name: Restore Maven Cache
id: restore-maven-cache
uses: actions/cache/[email protected]