From eeee460c1909a3c9e7acf16ded7d3e00e7f57aa5 Mon Sep 17 00:00:00 2001 From: Igor Krauch <243803173+igareck@users.noreply.github.com> Date: Fri, 26 Jun 2026 10:03:13 -0400 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B5=D1=80=D0=BA=D0=B0=D0=BB=D0=BE=20/?= =?UTF-8?q?=20Mirror=20to=20Bitbucket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Создание зеркала на Bitbucket.org Create a mirror on Bitbucket.org --- .github/workflows/mirror-to-bitbucket.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mirror-to-bitbucket.yml b/.github/workflows/mirror-to-bitbucket.yml index 4f461e4d2..db32430e8 100644 --- a/.github/workflows/mirror-to-bitbucket.yml +++ b/.github/workflows/mirror-to-bitbucket.yml @@ -8,7 +8,7 @@ on: concurrency: group: mirror-to-bitbucket - cancel-in-progress: true + cancel-in-progress: false permissions: contents: read @@ -16,6 +16,7 @@ permissions: jobs: mirror: runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Checkout GitHub repository @@ -33,9 +34,7 @@ jobs: set -euo pipefail # Replace main README only in the temporary GitHub Actions checkout. - curl -fsSL \ - "https://raw.githubusercontent.com/igareck/GoldCaviar/main/Files/README-BITBUCKET.md" \ - -o README.md + curl -fsSL "https://raw.githubusercontent.com/igareck/GoldCaviar/main/Files/README-BITBUCKET.md" -o README.md test -s README.md @@ -59,4 +58,18 @@ jobs: git remote remove bitbucket 2>/dev/null || true git remote add bitbucket "https://x-token-auth:${BITBUCKET_TOKEN}@bitbucket.org/igareck/vpn-configs-for-russia.git" - git push bitbucket HEAD:main --force + for attempt in 1 2 3 4 5; do + echo "Bitbucket push attempt $attempt/5" + + if git push bitbucket HEAD:main --force; then + echo "Bitbucket push successful" + exit 0 + fi + + sleep_time=$((attempt * 45)) + echo "Bitbucket push failed. Sleeping ${sleep_time}s before retry..." + sleep "$sleep_time" + done + + echo "Bitbucket push failed after all retries" + exit 1