From c6e374fe2c192dfea167eb81994f745f8f2177c9 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 27 Nov 2025 11:29:36 -0600 Subject: mirror tweak again --- .github/workflows/mirror.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to '.github') diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index ed94f14a..2bf5578c 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -54,18 +54,12 @@ jobs: git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" + - name: Check out GitHub Repository + run: | + git clone --mirror git@github.com:slskd/slskd + git for-each-ref --format="delete %(refname)" refs/pull refs/original | git update-ref --stdin + - name: Mirror to ${{ matrix.target.name }} run: | - echo "🔄 Mirroring repository to ${{ matrix.target.name }}..." - - # Clone the GitHub repository as a mirror (bare repo with all refs) - git clone --mirror https://github.com/${{ github.repository }}.git mirror-repo - cd mirror-repo - - # Set the push URL to the target repository - git remote set-url --push origin ${{ matrix.target.repo }} - - # Push everything to the mirror (handles all branches, tags, and deletions) - git push --mirror - - echo "✅ Successfully mirrored to ${{ matrix.target.name }}" \ No newline at end of file + git remote add mirror ${{ matrix.target.repo }} + git push --mirror mirror \ No newline at end of file -- cgit v1.2.3