We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb9c48e commit a6c79b9Copy full SHA for a6c79b9
1 file changed
.github/workflows/db-sync.yml
@@ -14,6 +14,7 @@ jobs:
14
env:
15
DUMP_FILE: /tmp/master_dump.dump
16
MAX_PARALLEL: 5
17
+ FAIL_ON_SLAVE_ERROR: "false"
18
# ── 从库列表由单个 Secret 管理,每行格式: name|dsn ──
19
# 新增从库只需编辑 GitHub Secret SLAVE_DSNS,无需改 workflow
20
SLAVE_DSNS: ${{ secrets.SLAVE_DSNS }}
@@ -251,8 +252,12 @@ jobs:
251
252
} >> $GITHUB_ENV
253
254
if [ "$FAILED" -gt 0 ]; then
- echo "::error::${FAILED}/${TOTAL} slave(s) failed"
255
- exit 1
+ if [ "${FAIL_ON_SLAVE_ERROR:-true}" = "true" ]; then
256
+ echo "::error::${FAILED}/${TOTAL} slave(s) failed"
257
+ exit 1
258
+ else
259
+ echo "::warning::${FAILED}/${TOTAL} slave(s) failed, but allowed"
260
+ fi
261
fi
262
263
0 commit comments