From 7dfd9311deb30b38856a8af92a809026c90a389d Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 27 Nov 2025 11:25:43 -0600 Subject: mirror tweak again --- .github/workflows/mirror.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 3747426b..d2dc1143 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -54,24 +54,12 @@ jobs: # Configure Git 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 "🔄 Syncing to ${{ matrix.target.name }}..." - # Add remote with SSH git remote add mirror ${{ matrix.target.repo }} - - # Push all branches and tags - git push mirror --all --force - git push mirror --tags --force - - echo "✅ Successfully synced to ${{ matrix.target.name }}" - - - name: Handle branch deletion on ${{ matrix.target.name }} - if: github.event_name == 'delete' && github.event.ref_type == 'branch' - run: | - DELETED_BRANCH="${{ github.event.ref }}" - echo "🗑️ Branch '$DELETED_BRANCH' was deleted, syncing deletion to ${{ matrix.target.name }}..." - - # Delete branch from mirror - git push ${{ matrix.target.repo }} --delete "$DELETED_BRANCH" || echo "Branch may not exist on ${{ matrix.target.name }}" \ No newline at end of file + git push --mirror mirror \ No newline at end of file -- cgit v1.2.3