Skip to content

Commit 8759289

Browse files
KingPrimesKingPrimes
authored andcommitted
build(ci): 更新 GitCode 同步工作流
- 替换 repository-mirroring-action 为 git-mirror-action - 更新工作流配置,适应新的同步工具 - 增加 SSH_PRIVATE_KEY环境变量配置 -调整仓库地址配置,支持更灵活的同步方式
1 parent b8abbc5 commit 8759289

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/sync-gitcode.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ jobs:
1111
- uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 0
14-
- uses: pixta-dev/repository-mirroring-action@v1
14+
- uses: wearerequired/git-mirror-action@v1
15+
env:
16+
# SSH 密钥(用于 SSH 协议)或 PAT(用于 HTTPS 协议)
17+
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
1518
with:
16-
target_repo_url:
17-
git@jihulab.com:KingPrimes/DataSource.git
18-
ssh_private_key:
19-
${{ secrets.SSH_PRIVATE_KEY }}
19+
# 目标仓库地址(支持 SSH 或 HTTPS)
20+
source-repo: "git@github.com:KingPrimes/DataSource.git" # 当前仓库地址
21+
destination-repo: "git@jihulab.com:KingPrimes/DataSource.git" # GitLab 目标地址
22+
2023
to_gitcode_com:
2124
runs-on: ubuntu-latest
2225
steps:
@@ -28,6 +31,7 @@ jobs:
2831
REMOTE: 'https://gitcode.com/KingPrimes/DataSource.git'
2932
GIT_USERNAME: KingPrimes
3033
GIT_PASSWORD: ${{ secrets.GIT_CODE_COM }}
34+
3135
to_gitee:
3236
runs-on: ubuntu-latest
3337
steps:

0 commit comments

Comments
 (0)