From bfa2e1760990703ea5a8c1a3fe5b90fb7d0e1788 Mon Sep 17 00:00:00 2001 From: Igor Krauch <243803173+igareck@users.noreply.github.com> Date: Fri, 26 Jun 2026 10:08:33 -0400 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B5=D1=80=D0=BA=D0=B0=D0=BB=D0=BE=20/?= =?UTF-8?q?=20Mirror=20to=20GitLab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Создание зеркала на GitLab.com Create a mirror on GitLab.com Updated GitHub Actions workflow to disable cancel-in-progress and added retry logic for GitLab push. --- .github/workflows/mirror-to-gitlab.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mirror-to-gitlab.yml b/.github/workflows/mirror-to-gitlab.yml index 642693b5b..95b029b2d 100644 --- a/.github/workflows/mirror-to-gitlab.yml +++ b/.github/workflows/mirror-to-gitlab.yml @@ -8,7 +8,7 @@ on: concurrency: group: mirror-to-gitlab - 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 @@ -35,4 +36,18 @@ jobs: git remote remove gitlab 2>/dev/null || true git remote add gitlab "https://oauth2:${GITLAB_TOKEN}@gitlab.com/igareck/vpn-configs-for-russia.git" - git push gitlab HEAD:main + 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