This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 a9526f14390 Harden nightly rsync uploads with required secret checks
(#37532)
a9526f14390 is described below
commit a9526f143907581a1c3a4fa3e51432b9dad5b9c4
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Dec 26 14:12:47 2025 +0800
Harden nightly rsync uploads with required secret checks (#37532)
---
.github/workflows/nightly-build.yml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.github/workflows/nightly-build.yml
b/.github/workflows/nightly-build.yml
index 51f6b9e389b..e67bf6798ad 100644
--- a/.github/workflows/nightly-build.yml
+++ b/.github/workflows/nightly-build.yml
@@ -70,6 +70,12 @@ jobs:
NIGHTLIES_RSYNC_KEY: ${{ secrets.NIGHTLIES_RSYNC_KEY }}
run: |
set -eo pipefail
+ for required in NIGHTLIES_RSYNC_HOST NIGHTLIES_RSYNC_USER
NIGHTLIES_RSYNC_KEY NIGHTLIES_RSYNC_PATH; do
+ if [ -z "${!required}" ]; then
+ echo "Required variable ${required} is empty; aborting upload."
>&2
+ exit 1
+ fi
+ done
KEY_FILE=$(mktemp)
trap 'rm -f ${KEY_FILE}' EXIT
printf '%s' "${NIGHTLIES_RSYNC_KEY}" > "${KEY_FILE}"
@@ -288,6 +294,12 @@ jobs:
TAR_PATH:
examples/shardingsphere-jdbc-example-generator/target/generated-sources/shardingsphere-jdbc-sample/${{
matrix.feature }}--${{ matrix.framework }}--${{ matrix.mode }}--${{
matrix.transaction }}.tar.gz
run: |
set -eo pipefail
+ for required in NIGHTLIES_RSYNC_HOST NIGHTLIES_RSYNC_USER
NIGHTLIES_RSYNC_KEY NIGHTLIES_RSYNC_PATH; do
+ if [ -z "${!required}" ]; then
+ echo "Required variable ${required} is empty; aborting upload."
>&2
+ exit 1
+ fi
+ done
KEY_FILE=$(mktemp)
trap 'rm -f ${KEY_FILE}' EXIT
printf '%s' "${NIGHTLIES_RSYNC_KEY}" > "${KEY_FILE}"