Зеркало / Mirror to Bitbucket

Создание зеркала на Bitbucket.org
Create a mirror on Bitbucket.org
This commit is contained in:
Igor Krauch
2026-06-26 10:03:13 -04:00
committed by GitHub
parent f042a82ff1
commit eeee460c19

View File

@@ -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