aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-11-27 11:25:43 -0600
committerJP Dillingham <jp@dillingham.me>2025-11-27 11:25:43 -0600
commit7dfd9311deb30b38856a8af92a809026c90a389d (patch)
tree9f566bb47ea65e86350b6a482bb806192bf82a60
parenta635a9d3dd30c98cbff603ab5640b440bae552ca (diff)
downloadslskd-7dfd9311deb30b38856a8af92a809026c90a389d.tar.gz
mirror tweak again
-rw-r--r--.github/workflows/mirror.yml22
1 files changed, 5 insertions, 17 deletions
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