mirror of
https://github.com/igareck/vpn-configs-for-russia.git
synced 2026-07-04 19:03:07 +00:00
Зеркало / Mirror to Bitbucket
Создание зеркала на Bitbucket.org Create a mirror on Bitbucket.org
This commit is contained in:
23
.github/workflows/mirror-to-bitbucket.yml
vendored
23
.github/workflows/mirror-to-bitbucket.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user