提交 5fb27048 编写于 作者: 徐晓伟's avatar 徐晓伟

👷 修正流水线操作同步的分支

上级 11815674
...@@ -106,7 +106,7 @@ jobs: ...@@ -106,7 +106,7 @@ jobs:
PR_URL: ${{ github.event.pull_request.html_url }} PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 将 main 分支代码同步到 FramaGit # 将 next 分支代码同步到 FramaGit
- name: Sync FramaGit - name: Sync FramaGit
run: | run: |
git config --global user.email "xuxiaowei@xuxiaowei.com.cn" git config --global user.email "xuxiaowei@xuxiaowei.com.cn"
...@@ -118,18 +118,18 @@ jobs: ...@@ -118,18 +118,18 @@ jobs:
eval $(ssh-agent -s) && ssh-add ~/.ssh/id_rsa eval $(ssh-agent -s) && ssh-add ~/.ssh/id_rsa
# 信任域名 # 信任域名
ssh-keyscan -H framagit.org >> ~/.ssh/known_hosts ssh-keyscan -H framagit.org >> ~/.ssh/known_hosts
# 切换 main 分支 # 切换 next 分支
git checkout main git checkout next
# 拉取 main 分支 # 拉取 next 分支
git pull origin main git pull origin next
# 查看远端 FramaGit # 查看远端 FramaGit
echo git@framagit.org:$GITHUB_REPOSITORY.git echo git@framagit.org:$GITHUB_REPOSITORY.git
# 添加远端 FramaGit # 添加远端 FramaGit
git remote add framagit git@framagit.org:$GITHUB_REPOSITORY.git git remote add framagit git@framagit.org:$GITHUB_REPOSITORY.git
# 拉取 main 分支 # 拉取 next 分支
git pull --progress -v --no-rebase framagit main git pull --progress -v --no-rebase framagit next
# 推送 main 分支 # 推送 next 分支
git push --progress framagit main:main git push --progress framagit next:next
sync: sync:
name: Sync name: Sync
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册