From c238c47d40cd89f90fd72dc28bc65ff31f59a6ae Mon Sep 17 00:00:00 2001 From: Igor Krauch Date: Wed, 13 May 2026 06:19:29 +0300 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=20Bitbucket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Создание зеркала на Bitbucket.org Create a mirror on Bitbucket.org --- .github/workflows/mirror-to-bitbucket.yml | 30 ++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mirror-to-bitbucket.yml b/.github/workflows/mirror-to-bitbucket.yml index 14251eba0..4f461e4d2 100644 --- a/.github/workflows/mirror-to-bitbucket.yml +++ b/.github/workflows/mirror-to-bitbucket.yml @@ -23,15 +23,39 @@ 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: Adapt repository for Bitbucket mirror + run: | + set -euo pipefail + + # Replace main README only in the temporary GitHub Actions checkout. + curl -fsSL \ + "https://raw.githubusercontent.com/igareck/GoldCaviar/main/Files/README-BITBUCKET.md" \ + -o README.md + + test -s README.md + + # Remove README variants that render poorly in Bitbucket. + git rm -f README-EN-US.md README-FA-IR.md README-ZH-CN.md 2>/dev/null || true + + git add README.md + + if ! git diff --cached --quiet; then + git commit -m "Adapt README files for Bitbucket mirror" + else + echo "No Bitbucket README adaptation changes" + fi + - name: Push main branch to Bitbucket env: BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_MIRROR_TOKEN }} run: | set -euo pipefail - git config user.name "github-actions" - git config user.email "github-actions@github.com" - git remote remove bitbucket 2>/dev/null || true git remote add bitbucket "https://x-token-auth:${BITBUCKET_TOKEN}@bitbucket.org/igareck/vpn-configs-for-russia.git"