From d71a69dc76f3201bcdc313b01320a262f548e301 Mon Sep 17 00:00:00 2001 From: Frederick Zhang Date: Thu, 30 Nov 2023 21:47:59 +1100 Subject: [PATCH 1/2] ci: Revert "Migrate to action-pack/gitlab-sync" This reverts commit cf0301e300b28e755494bcacc28c9d0fb79cc8e7. --- .github/workflows/repo-sync.yml | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index b021e53..f7c9580 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -1,17 +1,28 @@ name: GitLab Sync -on: [push, create, delete] +on: push jobs: - sync: - name: Synchronise to GitLab + branch-sync: + name: Synchronise Branches runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: action-pack/gitlab-sync@v3 - with: - username: Frederick888 - url: "https://git.tsundere.moe/Frederick888/git-credential-keepassxc.git" - token: ${{ secrets.GITLAB_ACCESS_TOKEN }} + - name: repo-sync + uses: wei/git-sync@v3 + with: + source_repo: "https://github.com/Frederick888/git-credential-keepassxc.git" + source_branch: "refs/remotes/source/*" + destination_repo: "https://Frederick888:${{ secrets.GITLAB_ACCESS_TOKEN }}@git.tsundere.moe/Frederick888/git-credential-keepassxc.git" + destination_branch: "refs/heads/*" + + tag-sync: + name: Synchronise Tags + runs-on: ubuntu-latest + steps: + - name: repo-sync + uses: wei/git-sync@v3 + with: + source_repo: "https://github.com/Frederick888/git-credential-keepassxc.git" + source_branch: "refs/tags/*" + destination_repo: "https://Frederick888:${{ secrets.GITLAB_ACCESS_TOKEN }}@git.tsundere.moe/Frederick888/git-credential-keepassxc.git" + destination_branch: "refs/tags/*" From 7550b3cfdfae449dd1e1076335d7f5d9d99ad7e9 Mon Sep 17 00:00:00 2001 From: Frederick Zhang Date: Thu, 30 Nov 2023 21:49:07 +1100 Subject: [PATCH 2/2] ci: Switch to fork of git-sync [1] https://github.com/wei/git-sync/pull/37 --- .github/workflows/repo-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index f7c9580..da5bb85 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: repo-sync - uses: wei/git-sync@v3 + uses: Frederick888/git-sync@master with: source_repo: "https://github.com/Frederick888/git-credential-keepassxc.git" source_branch: "refs/remotes/source/*" @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: repo-sync - uses: wei/git-sync@v3 + uses: Frederick888/git-sync@master with: source_repo: "https://github.com/Frederick888/git-credential-keepassxc.git" source_branch: "refs/tags/*"