0
0
mirror of https://github.com/igareck/vpn-configs-for-russia.git synced 2026-07-08 04:41:39 +03:00
Files
vpn-configs-for-russia/.github/workflows/mirror-to-gitea.yml
T
igareck e2e74dd26e Белые Списки / CIDR / Конфиги VK, YA, CDN, Beeline [clash]
Автообновление
Данные конфиги настроены на обход жестких белых списков по CIDR-фильтрации
Отличаются от основной/полной CIDR-подписки тем,
что тут проверенные/белые подсети только от: VK, YANDEX, CDNVIDEO, Beeline
Количество: 96
Время опубликования (мск): 2026-07-02 11:03:56
2026-07-02 11:03:58 +03:00

71 lines
1.9 KiB
YAML

name: Mirror to Gitea
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: mirror-to-gitea
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: Configure Git identity
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
- name: Remove GitHub Actions workflows from Gitea mirror
run: |
set -euo pipefail
# Gitea.com supports GitHub Actions-compatible workflows and may try
# to run .github/workflows/*.yml from the mirrored repository.
# This repository is only a mirror, so workflows must stay only on GitHub.
git rm -rf .github/workflows 2>/dev/null || true
if ! git diff --cached --quiet; then
git commit -m "Remove GitHub Actions workflows from Gitea mirror"
else
echo "No workflow files to remove for Gitea mirror"
fi
- name: Push main branch to Gitea
env:
GITEA_TOKEN: ${{ secrets.GITEA_MIRROR_TOKEN }}
run: |
set -euo pipefail
git remote remove gitea 2>/dev/null || true
git remote add gitea "https://igareck:${GITEA_TOKEN}@gitea.com/igareck/vpn-configs-for-russia.git"
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