1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 01:54:04 +00:00

ci: use the current branch for rebase

This commit is contained in:
Samuel Štancl 2025-01-02 06:31:26 +01:00
parent c5f187d2c7
commit a784ee0311

View file

@ -56,8 +56,9 @@ jobs:
- name: Push files (Unix) - name: Push files (Unix)
if: runner.os != 'Windows' if: runner.os != 'Windows'
run: | run: |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
for attempt in {1..3}; do 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..." echo "Attempt $attempt failed. Retrying in 5 seconds..."
sleep 5 sleep 5
} }