CI:修复测试报告——仅提交报告文件(避免误提交二进制),commit 用 git rev-parse 获取
build-test-deploy / ci (push) Successful in 7m10s

This commit is contained in:
zjk
2026-08-14 16:56:08 +08:00
parent 547b2b6b99
commit 1068d3e091
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ jobs:
git checkout --orphan test-reports >/dev/null 2>&1 || git checkout test-reports >/dev/null 2>&1 || true
git rm -rf . >/dev/null 2>&1 || true
cp -f reports/test-report.md reports/test-report.html reports/junit.xml . 2>/dev/null || true
git add -A >/dev/null 2>&1 || true
git add test-report.md test-report.html junit.xml
git commit -m "CI test report ${GITHUB_SHA:-}" >/dev/null 2>&1 || true
git push -f origin test-reports >/dev/null 2>&1 || echo "WARN: failed to push test-reports branch"
fi
+1 -1
View File
@@ -14,7 +14,7 @@ REPORT_DIR="${SRC_DIR}/reports"
mkdir -p "${REPORT_DIR}"
ARCH="$(uname -m)"
COMMIT="${GITHUB_SHA:-unknown}"
COMMIT="$(git -C "${SRC_DIR}" rev-parse --short HEAD 2>/dev/null || echo "${GITHUB_SHA:-unknown}")"
BUILD_DATE="$(date -u +'%Y-%m-%d %H:%M:%S UTC')"
#-----------------------------------------------------------------------