fix(cd): keep deploy checkout on main ref
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 3m56s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-11 00:47:47 +08:00
parent 485a423dea
commit ab5e963b83
2 changed files with 3 additions and 1 deletions

View File

@@ -1311,7 +1311,8 @@ jobs:
git remote remove origin 2>/dev/null || true
git remote add origin "$GITEA_SOURCE_URL"
git fetch --no-tags --prune --depth=1 origin "$GITHUB_SHA"
git checkout --force --detach FETCH_HEAD
# Deploy marker creation and push require a real local main ref.
git checkout --force -B main FETCH_HEAD
- name: Wait for Host Web Build Pressure
# 2026-06-27 Codex: post-deploy smoke is also browser-heavy. Refuse to

View File

@@ -115,6 +115,7 @@ def test_cd_prunes_and_verifies_api_executor_boundary_in_production() -> None:
assert "delete pods --all-namespaces" in workflow
assert "repair-ssh-key|repair-known-hosts|ssh-mcp-key" in workflow
assert "github.com/kubernetes-sigs/kustomize" not in workflow
assert "git checkout --force -B main FETCH_HEAD" in workflow
def test_gitea_workflows_never_download_github_actions() -> None: