From 9a7167c0f45a1d9b10076db677b525705842978e Mon Sep 17 00:00:00 2001 From: ange Date: Mon, 18 Nov 2024 16:10:59 +0000 Subject: [PATCH] feat: change branch name --- mirror.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mirror.sh b/mirror.sh index 0f5bd44..f5318ba 100755 --- a/mirror.sh +++ b/mirror.sh @@ -8,7 +8,7 @@ chmod 600 "$HOME/.ssh/id_ed25519" URL="${GITHUB_SERVER_URL/\/\//\/\/$GITHUB_REPOSITORY_OWNER:$INPUT_TOKEN@}/$GITHUB_REPOSITORY" set -x -git init -b main +git init -b "$GITHUB_REF_NAME" git remote add origin "$URL" git fetch --no-tags --prune --no-recurse-submodules origin "$GITHUB_SHA" -git push --repo="$INPUT_URL" origin "$GITHUB_SHA:$GITHUB_REF" +git push --repo="$INPUT_URL" origin "$GITHUB_REF_NAME:$GITHUB_REF"