From 2a271061cff7c67a3033fdc85feef21b0454a51c Mon Sep 17 00:00:00 2001 From: Igor Krauch <243803173+igareck@users.noreply.github.com> Date: Fri, 26 Jun 2026 11:18:11 -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=20Gitea?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Создание зеркала на Gitea.com Create a mirror on Gitea.com This change adds a step to configure Git identity and removes GitHub Actions workflows from the Gitea mirror to prevent execution in the mirrored repository. --- .github/workflows/mirror-to-gitea.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mirror-to-gitea.yml b/.github/workflows/mirror-to-gitea.yml index 6feda7dcc..7b965e792 100644 --- a/.github/workflows/mirror-to-gitea.yml +++ b/.github/workflows/mirror-to-gitea.yml @@ -24,15 +24,32 @@ jobs: 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 config user.name "github-actions" - git config user.email "github-actions@github.com" - git remote remove gitea 2>/dev/null || true git remote add gitea "https://igareck:${GITEA_TOKEN}@gitea.com/igareck/vpn-configs-for-russia.git"