ci(canonize): prune the Gitea remote, or deleted branches never disappear
Observed rather than reasoned: after the leftover rotation branch was deleted on both remotes, pipeline 492 still reported it. The runner recycles its workspace under GIT_STRATEGY=fetch, and git fetch without --prune keeps remote-tracking refs for branches that no longer exist upstream. The job would have kept naming a branch nobody can find, indefinitely - and before the previous commit it would have kept failing on it, with deletion offering no way out. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
14cf9318ea
commit
ccf04608f5
+6
-1
@@ -72,7 +72,12 @@ canonize_rotation:
|
||||
- git config --global user.email "ci@axion1337.chat"
|
||||
- git config --global user.name "TURN-Rotation (automatische Kanonisierung)"
|
||||
- git remote add gitea https://rohana.axion1337.de/sorb/axion1337.chat-gitops.git
|
||||
- git fetch --quiet gitea
|
||||
# --prune ist Pflicht, nicht Kosmetik: der Runner recycelt seinen Workspace
|
||||
# (GIT_STRATEGY=fetch), und ohne prune bleiben remote-tracking-Refs geloeschter
|
||||
# Zweige stehen. Der Job saehe einen laengst entfernten Rotationszweig sonst
|
||||
# dauerhaft weiter - live beobachtet am 2026-08-18, Pipeline 492: beide Remotes
|
||||
# waren nachweislich leer, der Job meldete den Zweig trotzdem.
|
||||
- git fetch --quiet --prune gitea
|
||||
# Kein 'fetch origin' noetig: der Runner hat main schon ausgecheckt (GIT_DEPTH 0),
|
||||
# CI_COMMIT_SHA ist der Stand von main beim Anlegen der Pipeline.
|
||||
- git checkout -B main "$CI_COMMIT_SHA"
|
||||
|
||||
Reference in New Issue
Block a user