mirror of
https://github.com/igareck/vpn-configs-for-russia.git
synced 2026-07-08 19:51:38 +03:00
e2e74dd26e
Автообновление Данные конфиги настроены на обход жестких белых списков по CIDR-фильтрации Отличаются от основной/полной CIDR-подписки тем, что тут проверенные/белые подсети только от: VK, YANDEX, CDNVIDEO, Beeline Количество: 96 Время опубликования (мск): 2026-07-02 11:03:56
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: Mirror to GitLab
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: mirror-to-gitlab
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
mirror:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
|
|
steps:
|
|
- name: Checkout GitHub repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Push main branch to GitLab
|
|
env:
|
|
GITLAB_TOKEN: ${{ secrets.GITLAB_MIRROR_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
git config user.name "github-actions"
|
|
git config user.email "github-actions@github.com"
|
|
|
|
git remote remove gitlab 2>/dev/null || true
|
|
git remote add gitlab "https://oauth2:${GITLAB_TOKEN}@gitlab.com/igareck/vpn-configs-for-russia.git"
|
|
|
|
for attempt in 1 2 3 4 5; do
|
|
echo "GitLab push attempt $attempt/5"
|
|
|
|
if git push gitlab HEAD:main; then
|
|
echo "GitLab push successful"
|
|
exit 0
|
|
fi
|
|
|
|
sleep_time=$((attempt * 30))
|
|
echo "GitLab push failed. Sleeping ${sleep_time}s before retry..."
|
|
sleep "$sleep_time"
|
|
done
|
|
|
|
echo "GitLab push failed after all retries"
|
|
exit 1
|