Skip to content

Commit 059a3fc

Browse files
committed
ci: materialize origin refs as refs/heads before mirror push
actions/checkout fetches origin branches under refs/remotes/origin/* only. git push --mirror copies every ref to the destination as-is, so those landed on forge as refs/remotes/origin/* (invisible in the branches view) and refs/heads/main never made it across — the only proper branch that did was the one actions/checkout materialized to run the workflow on (refs/heads/ci/forge-mirror). Re-fetch with refspec +refs/heads/*:refs/heads/* so the local repo has the branches under refs/heads, then --mirror pushes them as real branches. Tags get the same refspec to keep them out of refs/remotes.
1 parent 2f2450f commit 059a3fc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/tangle.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ jobs:
3131
IdentitiesOnly yes
3232
EOF
3333
chmod 600 ~/.ssh/config
34-
git fetch --tags origin
34+
35+
# actions/checkout leaves origin branches under refs/remotes/origin/*
36+
# — git push --mirror would copy those as remote-tracking refs on
37+
# the destination instead of as proper branches. Materialize them
38+
# under refs/heads/* first so the mirror push lands them as real
39+
# branches that forge can render.
40+
git fetch origin '+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*'
3541
git remote add tangled git@knot.blacksky.community:blackskyweb.xyz/rsky
3642
git push --mirror tangled

0 commit comments

Comments
 (0)