From a5bae8a28a36af720a50b6dfbc4893db2a6ced52 Mon Sep 17 00:00:00 2001 From: xucz Date: Fri, 8 Mar 2024 17:14:56 +0800 Subject: [PATCH] update sync script. --- .github/workflows/gitee-sync-shell.sh | 6 ++++++ .github/workflows/gitee-sync.yml | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gitee-sync-shell.sh b/.github/workflows/gitee-sync-shell.sh index 61700cd43..bccde2d90 100755 --- a/.github/workflows/gitee-sync-shell.sh +++ b/.github/workflows/gitee-sync-shell.sh @@ -5,6 +5,12 @@ git config --global user.name "sync2gitee" pwd git remote -v +GITHUB_REF=$1 +ACTION_BRANCH=$(echo ${GITHUB_REF#refs/heads}) +echo ACTION_BRANCH=$ACTION_BRANCH + +git checkout $ACTION_BRANCH + # change android maven to china repos sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample/settings.gradle sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" Android/APIExample/gradle/wrapper/gradle-wrapper.properties diff --git a/.github/workflows/gitee-sync.yml b/.github/workflows/gitee-sync.yml index 02c9462fe..048af255c 100644 --- a/.github/workflows/gitee-sync.yml +++ b/.github/workflows/gitee-sync.yml @@ -14,7 +14,7 @@ jobs: if: github.actor != 'dependabot[bot]' steps: - name: Gitee sync repo - uses: xgfd3/hub-mirror-action@v1.0 + uses: xgfd3/hub-mirror-action@v1.1 with: src: github/AgoraIO dst: gitee/agoraio-community @@ -25,4 +25,5 @@ jobs: dst_token: ${{ secrets.GITEE_PRIVATE_TOKEN }} force_update: true account_type: org - shell_path: ./.github/workflows/gitee-sync-shell.sh \ No newline at end of file + shell_path: ./.github/workflows/gitee-sync-shell.sh + shell_arg: ${{ github.ref }} \ No newline at end of file