fix(staging): bound trusted main fetch retries

This commit is contained in:
Jesse
2026-08-06 17:40:41 +08:00
parent 02cc483b7c
commit 975f5c346d
5 changed files with 53 additions and 4 deletions
@@ -488,7 +488,10 @@ test("Gitea deploy and migration consume the exact successful gate artifact", ()
assert.match(workflow, /actions\/artifacts\/\$artifact_id\/zip/);
assert.match(workflow, /node frontend\/scripts\/staging-image-manifest\.mjs/);
assert.match(workflow, /name: Checkout trusted main controller/);
assert.match(workflow, /git fetch --no-tags origin main "\$DEPLOY_SHA"/);
assert.match(workflow, /for attempt in 1 2 3/);
assert.match(workflow, /timeout 120 git fetch --no-tags origin main "\$DEPLOY_SHA"/);
assert.match(workflow, /trusted main fetch failed after \$attempt bounded attempts/);
assert.match(workflow, /\[\[ "\$fetch_succeeded" == true \]\]/);
assert.match(workflow, /git checkout --detach --force origin\/main/);
assert.match(workflow, /git merge-base --is-ancestor "\$DEPLOY_SHA" HEAD/);
assert.doesNotMatch(workflow, /docker manifest inspect/);