From 3ed7abc86dfda904003c4757d52dc3145749451e Mon Sep 17 00:00:00 2001 From: ange Date: Mon, 18 Nov 2024 10:34:43 +0000 Subject: [PATCH] fix: fetch branch before checkout --- mirror.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/mirror.sh b/mirror.sh index 7b6aade..f4d4d38 100755 --- a/mirror.sh +++ b/mirror.sh @@ -5,5 +5,6 @@ echo "$INPUT_SSH_PRIV" > "$HOME/.ssh/id_ed25519" echo "$INPUT_KNOWN_HOSTS" > "$HOME/.ssh/known_hosts" git remote set-url --push origin "$INPUT_URL" +git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin "$GITHUB_REF_NAME" git checkout "$GITHUB_REF_NAME" git push origin "$GITHUB_REF_NAME"