fix(ci): pull current branch instead of hardcoded main
Some checks failed
Deploy Noval to K3s / deploy (push) Failing after 32s

This commit is contained in:
2026-03-22 17:30:30 +08:00
parent a470739190
commit 2ec7cd25cd

View File

@@ -22,7 +22,8 @@ jobs:
cd /root/k8syaml/NovalRedot cd /root/k8syaml/NovalRedot
echo "📥 拉取最新代码..." echo "📥 拉取最新代码..."
git pull origin main BRANCH="${GITHUB_REF_NAME:-master}"
git pull origin "${BRANCH}"
NEW_COMMIT_SHA=$(git rev-parse --short HEAD) NEW_COMMIT_SHA=$(git rev-parse --short HEAD)
NEW_COMMIT_MSG=$(git log -1 --oneline) NEW_COMMIT_MSG=$(git log -1 --oneline)