mirror of
https://github.com/igareck/vpn-configs-for-russia.git
synced 2026-07-11 21:52:51 +00:00
Зеркало / Mirror to Gitea
Создание зеркала на Gitea.com Create a mirror on Gitea.com
This commit is contained in:
19
.github/workflows/mirror-to-gitea.yml
vendored
19
.github/workflows/mirror-to-gitea.yml
vendored
@@ -8,7 +8,7 @@ on:
|
|||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: mirror-to-gitea
|
group: mirror-to-gitea
|
||||||
cancel-in-progress: true
|
cancel-in-progress: false
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -16,6 +16,7 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
mirror:
|
mirror:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout GitHub repository
|
- name: Checkout GitHub repository
|
||||||
@@ -35,4 +36,18 @@ jobs:
|
|||||||
git remote remove gitea 2>/dev/null || true
|
git remote remove gitea 2>/dev/null || true
|
||||||
git remote add gitea "https://igareck:${GITEA_TOKEN}@gitea.com/igareck/vpn-configs-for-russia.git"
|
git remote add gitea "https://igareck:${GITEA_TOKEN}@gitea.com/igareck/vpn-configs-for-russia.git"
|
||||||
|
|
||||||
git push gitea HEAD:main --force
|
for attempt in 1 2 3 4 5; do
|
||||||
|
echo "Gitea push attempt $attempt/5"
|
||||||
|
|
||||||
|
if git push gitea HEAD:main --force; then
|
||||||
|
echo "Gitea push successful"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep_time=$((attempt * 45))
|
||||||
|
echo "Gitea push failed. Sleeping ${sleep_time}s before retry..."
|
||||||
|
sleep "$sleep_time"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Gitea push failed after all retries"
|
||||||
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user