From 2a4b3a2a4327c8000f0b583d91575c800c6035c4 Mon Sep 17 00:00:00 2001
From: Earl Warren <contact@earl-warren.org>
Date: Mon, 15 Jan 2024 19:01:28 +0000
Subject: [PATCH] [CI] push forgejo branches to the specified destination
 (squash) verbose

(cherry picked from commit 848685d68d8bf7b7a38fea221db5e474cd30ea79)
(cherry picked from commit e8021f281f905e4499db4e67c91326932bfd613f)
---
 .forgejo/workflows/mirror.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.forgejo/workflows/mirror.yml b/.forgejo/workflows/mirror.yml
index fd419be49d..3a4099db5d 100644
--- a/.forgejo/workflows/mirror.yml
+++ b/.forgejo/workflows/mirror.yml
@@ -20,6 +20,8 @@ jobs:
           git fetch origin refs/heads/forgejo:refs/mirror/forgejo
           git ls-remote origin refs/heads/v*/forgejo | while read sha full_ref ; do
             ref=${full_ref#refs/heads/}
+            echo git fetch origin $full_ref:refs/mirror/$ref
             git fetch origin $full_ref:refs/mirror/$ref
           done
+          echo git push --force https://${{ vars.MIRROR_DESTINATION }} refs/mirror/*:refs/heads/*
           git push --force https://any:${{ secrets.MIRROR_TOKEN }}@${{ vars.MIRROR_DESTINATION }} refs/mirror/*:refs/heads/*