Skip to content

Commit

Permalink
修复重复添加origin地址的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
代军 committed Sep 12, 2024
1 parent a5203d2 commit e6d5458
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/go-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ jobs:
git remote add upstream https://github.com/baidubce/app-builder.git
git fetch upstream
# 确保拉取最新的 origin 分支
git remote add origin https://github.com/$GITHUB_ACTOR/app-builder.git
git fetch origin
# 确保远程 origin 不重复添加
if git remote | grep -q origin; then
echo "remote origin already exists"
else
git remote add origin https://github.com/$GITHUB_ACTOR/app-builder.git
fi
# 显示远程仓库的配置
git remote -v
Expand Down

0 comments on commit e6d5458

Please sign in to comment.