From a784ee031195bf57cc5a718227a60b18f537da82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Thu, 2 Jan 2025 06:31:26 +0100 Subject: [PATCH] ci: use the current branch for rebase --- .github/workflows/extensions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/extensions.yml b/.github/workflows/extensions.yml index 44694d19..647cd29b 100644 --- a/.github/workflows/extensions.yml +++ b/.github/workflows/extensions.yml @@ -56,8 +56,9 @@ jobs: - name: Push files (Unix) if: runner.os != 'Windows' run: | + CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) for attempt in {1..3}; do - git pull --rebase && git push && exit 0 || { + git pull --rebase origin/$CURRENT_BRANCH && git push origin $CURRENT_BRANCH && exit 0 || { echo "Attempt $attempt failed. Retrying in 5 seconds..." sleep 5 }