From c59464a076f18280a21ad4f4a96bd375dc4e50f3 Mon Sep 17 00:00:00 2001 From: pooneyy <85266337+pooneyy@users.noreply.github.com> Date: Sat, 28 Feb 2026 13:20:58 +0800 Subject: [PATCH 1/5] ci(sync): update sync workflow remote configuration - add explicit `ssh-host` field to remote matrix entries for clarity - update ssh-keyscan commands to use `ssh-host` instead of `name` - rename remote identifiers in matrix from domain names to platform names --- .github/workflows/sync.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 14a008e4b..ded15f95c 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -23,10 +23,12 @@ jobs: fail-fast: false matrix: remote: - - name: codeberg.org + - name: Codeberg + ssh-host: codeberg.org ssh-url: git@codeberg.org:pooneyy/1Panel-Appstore.git https-url: https://codeberg.org/pooneyy/1Panel-Appstore - - name: gitea.com + - name: Gitea + ssh-host: gitea.com ssh-url: git@gitea.com:pooneyy/1Panel-Appstore.git https-url: https://gitea.com/pooneyy/1Panel-Appstore @@ -49,7 +51,7 @@ jobs: - name: 添加目标主机的公钥 run: | mkdir -p ~/.ssh - ssh-keyscan ${{ matrix.remote.name }} >> ~/.ssh/known_hosts + ssh-keyscan ${{ matrix.remote.ssh-host }} >> ~/.ssh/known_hosts - name: 配置本地仓库 run: | From f2c11a2a5bc6ed27ea139536fe506dee0662ca96 Mon Sep 17 00:00:00 2001 From: pooneyy <85266337+pooneyy@users.noreply.github.com> Date: Sun, 1 Mar 2026 22:18:46 +0800 Subject: [PATCH 2/5] ci(sync): add SSH port configuration support - rename sync job to ssh-sync for clarity - add SSH_PORT variable support for ssh-keyscan command - implement conditional logic for SSH port configuration - update known_hosts setting to support non-standard SSH ports --- .github/workflows/sync.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index ded15f95c..c06b5fafd 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -16,7 +16,7 @@ permissions: contents: read jobs: - sync: + ssh-sync: name: 同步到 ${{ matrix.remote.name }} runs-on: ubuntu-latest strategy: @@ -51,7 +51,13 @@ jobs: - name: 添加目标主机的公钥 run: | mkdir -p ~/.ssh - ssh-keyscan ${{ matrix.remote.ssh-host }} >> ~/.ssh/known_hosts + SSH_HOST=${{ matrix.remote.ssh-host }} + SSH_PORT=${{ matrix.remote.ssh-port }} + if [ -n "$SSH_PORT" ]; then + ssh-keyscan -p $SSH_PORT $SSH_HOST >> ~/.ssh/known_hosts + else + ssh-keyscan $SSH_HOST >> ~/.ssh/known_hosts + fi - name: 配置本地仓库 run: | From a2965474672bb42f434a1a1f4bacf1b0dbd99b87 Mon Sep 17 00:00:00 2001 From: pooneyy <85266337+pooneyy@users.noreply.github.com> Date: Sun, 1 Mar 2026 22:21:43 +0800 Subject: [PATCH 3/5] ci(sync): add Bitnet and Smartscf sync targets to workflow - add Bitnet repository sync target - add smartscf repository sync target with non-standard SSH port (8122) --- .github/workflows/sync.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index c06b5fafd..0d3cf95b5 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -31,6 +31,15 @@ jobs: ssh-host: gitea.com ssh-url: git@gitea.com:pooneyy/1Panel-Appstore.git https-url: https://gitea.com/pooneyy/1Panel-Appstore + - name: Bitnet + ssh-host: git-clone.bitnet.fun + ssh-url: git@git-clone.bitnet.fun:pooneyy/1Panel-Appstore.git + https-url: https://git.bitnet.fun/pooneyy/1Panel-Appstore + - name: Smartscf + ssh-host: repo.smartscf.cn + ssh-port: 8122 + ssh-url: ssh://git@repo.smartscf.cn:8122/pooneyy/1Panel-Appstore.git + https-url: https://repo.smartscf.cn/pooneyy/1Panel-Appstore steps: - name: 检出完整仓库 From 85666057957199a0d0d122338b4a0279e076d51f Mon Sep 17 00:00:00 2001 From: pooneyy <85266337+pooneyy@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:50:07 +0800 Subject: [PATCH 4/5] ci(sync): add HTTP sync workflow - add new `http-sync` job for syncing to remote repositories via HTTPS - configure git user and authentication using PAT secrets - implement branch detection and tracking for all remote branches - add force push with pruning for all branches and tags - include success/failure summary logging for workflow runs --- .github/workflows/sync.yml | 60 +++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 0d3cf95b5..9e2e1b4c2 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -97,4 +97,62 @@ jobs: - name: 记录失败摘要 if: failure() run: | - echo "❌ $(date +"%Y-%m-%d %H:%M:%S %:z") 未能同步到 **${{ matrix.remote.https-url }}**" >> $GITHUB_STEP_SUMMARY \ No newline at end of file + echo "❌ $(date +"%Y-%m-%d %H:%M:%S %:z") 未能同步到 **${{ matrix.remote.https-url }}**" >> $GITHUB_STEP_SUMMARY + + http-sync: + name: 同步到 ${{ matrix.remote.name }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + remote: + - name: + https-url: + pat-secret: + + steps: + - name: 检出完整仓库 + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: 检测默认分支 + run: | + echo "默认分支: ${{ github.event.repository.default_branch }}" + echo "当前分支 (pushed): ${{ github.ref_name }}" + + - name: 配置本地仓库 + run: | + git config --global --add safe.directory ${{ github.workspace }} + git config user.name "github-actions[bot]" + git config user.email ${{ secrets.SYNC_EMAIL }} + BASE_PATH="${{ matrix.remote.https-url }}" + BASE_PATH="${BASE_PATH#https://}" + if [[ ! "$BASE_PATH" =~ \.git$ ]]; then + BASE_PATH="${BASE_PATH}.git" + fi + git remote add ${{ matrix.remote.name }} "https://git:${{ secrets[matrix.remote.pat-secret] }}@${BASE_PATH}" + git branch -r | grep -v '\->' | while read remote; do + branch=${remote#origin/} + git branch --track "$branch" "$remote" 2>/dev/null && echo "创建本地分支: $branch" || echo "分支 $branch 已存在" + done + + - name: 列出所有本地分支 + run: git branch + + - name: 强制推送所有分支和所有标签到 ${{ matrix.remote.name }} + run: | + echo "将所有分支推送到 ${{ matrix.remote.name }} (修剪模式)..." + git push --force --prune ${{ matrix.remote.name }} --all + echo "将所有 tags 推送到 ${{ matrix.remote.name }}..." + git push --force ${{ matrix.remote.name }} --tags + + - name: 记录成功摘要 + if: success() + run: | + echo "✅ $(date +"%Y-%m-%d %H:%M:%S %:z") 成功同步到 **${{ matrix.remote.https-url }}**" >> $GITHUB_STEP_SUMMARY + + - name: 记录失败摘要 + if: failure() + run: | + echo "❌ $(date +"%Y-%m-%d %H:%M:%S %:z") 未能同步到 **${{ matrix.remote.https-url }}**" >> $GITHUB_STEP_SUMMARY From 904187632d92e8a71acab8a7c649f49c98116037 Mon Sep 17 00:00:00 2001 From: pooneyy <85266337+pooneyy@users.noreply.github.com> Date: Mon, 2 Mar 2026 12:15:35 +0800 Subject: [PATCH 5/5] ci(sync): add piscesys sync configuration - add piscesys as a new remote target in the sync matrix - configure https-url for the piscesys repository - add corresponding personal access token secret --- .github/workflows/sync.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 9e2e1b4c2..b647f62ac 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -106,9 +106,9 @@ jobs: fail-fast: false matrix: remote: - - name: - https-url: - pat-secret: + - name: piscesys + https-url: https://piscesys.com/pooneyy/1Panel-Appstore + pat-secret: SYNC_PAT_PISCESYS steps: - name: 检出完整仓库