diff --git a/.ci/update_mirror.sh b/.ci/update_mirror.sh index 3a5c3a5ee..a3bc5798a 100755 --- a/.ci/update_mirror.sh +++ b/.ci/update_mirror.sh @@ -4,18 +4,18 @@ usage () { echo ".ci/update_remote.sh [option] [target]" } -check_remote () { - if [ -z "$(git remote -v | grep git@gitee.com:spacevim/SpaceVim.git)" ];then - git remote add gitee git@gitee.com:spacevim/SpaceVim.git - fi -} - push_gitee() { git remote add gitee https://SpaceVimBot:${BOTSECRET}@gitee.com/spacevim/SpaceVim.git git push gitee master } +push_gitlab() +{ + git remote add gitlab https://SpaceVimBot:${BOTSECRET}@gitlab.com/SpaceVim/SpaceVim.git + git push gitlab master +} + push_coding() { git remote add coding https://spacevim%40outlook.com:${CODINGBOTSECRET}@e.coding.net/spacevim/SpaceVim.git @@ -23,24 +23,24 @@ push_coding() } main () { - if [ $# -gt 0 ] - check_remote - then - case $1 in - --help|-h) - usage - exit 0 - ;; - gitee) - push_gitee - exit 0 - ;; - coding) - push_coding - exit 0 - ;; - esac - fi + case $1 in + --help|-h) + usage + exit 0 + ;; + gitee) + push_gitee + exit 0 + ;; + gitlab) + push_gitlab + exit 0 + ;; + coding) + push_coding + exit 0 + ;; + esac } main $@ diff --git a/.github/workflows/remote.yml b/.github/workflows/remote.yml index 56e3b43e3..940b7fea3 100644 --- a/.github/workflows/remote.yml +++ b/.github/workflows/remote.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - mirror: ["gitee", "coding"] + mirror: ["gitee", "coding", "gitlab"] runs-on: ubuntu-latest steps: - name: Checkout