Skip to content

Commit fb24abc

Browse files
author
刘健
committed
Update .gitlab-ci.yml file
1 parent 0e3fb84 commit fb24abc

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

.gitlab-ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)