File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,14 +32,14 @@ sync_job:
3232 # 获取 GitLab main 分支的最新提交
3333 - git featch http://$DEPLOY_USER:$DEPLOY_TOKEN@gitlab.eolink.com/apipark/APIPark main:gitlab-main
3434 - DIFF=$(git diff "$GITHUB_BRANCH" gitlab-main)
35- # # 比较 SHA,检查是否有更改
36- # - if [ -n "$DIFF" ]; then
37- # echo "Differences detected, syncing to GitLab..."
38- # # 推送到 GitLab main 分支
39- # git push "$GITLAB_REPO" "$GITHUB_BRANCH:$GITLAB_BRANCH"
40- # else
41- # echo "No differences found between GitHub and GitLab main branches."
42- # fi
35+ # 比较 SHA,检查是否有更改
36+ - if [ -n "$DIFF" ]; then
37+ - echo "Differences detected, syncing to GitLab..."
38+ # 推送到 GitLab main 分支
39+ - git push "$GITLAB_REPO" "$GITHUB_BRANCH:$GITLAB_BRANCH"
40+ - else
41+ - echo "No differences found between GitHub and GitLab main branches."
42+ - fi
4343# only:
4444# - schedules
4545 variables :
You can’t perform that action at this time.
0 commit comments